feat: return status 502 on proxy error
This commit is contained in:
parent
1881f27928
commit
4907c0b51f
|
@ -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))
|
logger.Error(r.Context(), "proxy error", logger.E(err))
|
||||||
sentry.CaptureException(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 {
|
func NewServer(funcs ...OptionFunc) *Server {
|
||||||
|
|
Loading…
Reference in New Issue