@marcel91200 / caddy Mirror · read-only / commits / 72541f1c
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 13, 15:30 UTC

caddyhttp: Set `http.error.message` to the HandlerError message (#4971)

Francis Lavoie committed Aug 23, 2022 at 01:31 UTC 72541f1cb81a97466afcdf0a6164367c499a9f81
1 file changed +2 -1
modules/caddyhttp/server.go
+2 -1
@@ -526,8 +526,9 @@ func (*HTTPErrorConfig) WithError(r *http.Request, err error) *http.Request {
526 if handlerErr, ok := err.(HandlerError); ok {
527 repl.Set("http.error.status_code", handlerErr.StatusCode)
528 repl.Set("http.error.status_text", http.StatusText(handlerErr.StatusCode))
529 - repl.Set("http.error.trace", handlerErr.Trace)
529 repl.Set("http.error.id", handlerErr.ID)
530 + repl.Set("http.error.trace", handlerErr.Trace)
531 + repl.Set("http.error.message", handlerErr.Err.Error())
532 }
533
534 return r