feat: return status 502 on proxy error

This commit is contained in:
wpetit 2024-06-26 13:53:22 +02:00
parent 1881f27928
commit 4907c0b51f
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ func (s *Server) errorHandler(w http.ResponseWriter, r *http.Request, err error)
logger.Error(r.Context(), "proxy error", logger.E(err))
sentry.CaptureException(err)
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
http.Error(w, http.StatusText(http.StatusBadGateway), http.StatusBadGateway)
}
func NewServer(funcs ...OptionFunc) *Server {