mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 22:23:48 +03:00
caddyhttp: Set http.error.message
to the HandlerError message (#4971)
This commit is contained in:
parent
fe5f5dfd6a
commit
72541f1cb8
1 changed files with 2 additions and 1 deletions
|
@ -526,8 +526,9 @@ func (*HTTPErrorConfig) WithError(r *http.Request, err error) *http.Request {
|
||||||
if handlerErr, ok := err.(HandlerError); ok {
|
if handlerErr, ok := err.(HandlerError); ok {
|
||||||
repl.Set("http.error.status_code", handlerErr.StatusCode)
|
repl.Set("http.error.status_code", handlerErr.StatusCode)
|
||||||
repl.Set("http.error.status_text", http.StatusText(handlerErr.StatusCode))
|
repl.Set("http.error.status_text", http.StatusText(handlerErr.StatusCode))
|
||||||
repl.Set("http.error.trace", handlerErr.Trace)
|
|
||||||
repl.Set("http.error.id", handlerErr.ID)
|
repl.Set("http.error.id", handlerErr.ID)
|
||||||
|
repl.Set("http.error.trace", handlerErr.Trace)
|
||||||
|
repl.Set("http.error.message", handlerErr.Err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
return r
|
return r
|
||||||
|
|
Loading…
Reference in a new issue