From 4907c0b51fd98bcce433a28f56ccdb29bfc5d3c7 Mon Sep 17 00:00:00 2001 From: William Petit Date: Wed, 26 Jun 2024 13:53:22 +0200 Subject: [PATCH] feat: return status 502 on proxy error --- internal/proxy/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/proxy/server.go b/internal/proxy/server.go index 93fb5cc..0668974 100644 --- a/internal/proxy/server.go +++ b/internal/proxy/server.go @@ -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 {