Open
Description
@mafredri one thing we could do is have `proxyWorkspaceApp` return the reverse proxy and an error/boolean/something. That way the code can look _something_ like:
token, audit, ok := ResolveRequest(rw, r, ResolveRequestOptions{
// ....
proxy, err := s.proxyWorkspaceApp(rw, r, *token, chiPath, appurl.ApplicationURL{})
audit()
proxy.ServeHTTP(rw, r)
That would catch all the top level proxy errors. It is a bit of a refactor, and I am sure I am not thinking of something. However the audit log up front feels like an improvement, and we do not need to hook into the status writer.
Originally posted by @Emyrk in coder/coder#16801 (comment)
Metadata
Metadata
Assignees
Labels
No labels