Merge current v2.11 into v3.1
This commit is contained in:
commit
85f4fd0979
40 changed files with 114 additions and 116 deletions
|
@ -70,8 +70,8 @@ func (c *customErrors) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
|||
logger := middlewares.GetLogger(req.Context(), c.name, typeName)
|
||||
|
||||
if c.backendHandler == nil {
|
||||
logger.Error().Msg("Error pages: no backend handler.")
|
||||
observability.SetStatusErrorf(req.Context(), "Error pages: no backend handler.")
|
||||
logger.Error().Msg("No backend handler.")
|
||||
observability.SetStatusErrorf(req.Context(), "No backend handler.")
|
||||
c.next.ServeHTTP(rw, req)
|
||||
return
|
||||
}
|
||||
|
@ -95,8 +95,8 @@ func (c *customErrors) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
|
|||
|
||||
pageReq, err := newRequest("http://" + req.Host + query)
|
||||
if err != nil {
|
||||
logger.Error().Err(err).Send()
|
||||
observability.SetStatusErrorf(req.Context(), err.Error())
|
||||
logger.Error().Msgf("Unable to create error page request: %v", err)
|
||||
observability.SetStatusErrorf(req.Context(), "Unable to create error page request: %v", err)
|
||||
http.Error(rw, http.StatusText(code), code)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue