return 502 on proxy error (#703)

This commit is contained in:
Michael Quigley 2024-07-29 11:44:08 -04:00
parent ab4132cbe8
commit d9d1bde9f6
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -95,6 +95,7 @@ func newReverseProxy(cfg *BackendConfig) (*httputil.ReverseProxy, error) {
}
proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) {
logrus.Errorf("error proxying: %v", err)
w.WriteHeader(http.StatusBadGateway)
}
return proxy, nil