@marcel91200 / caddy Mirror · read-only / commits / ba000067
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 14, 05:15 UTC

Remove unused fields from HandlerError

Matthew Holt committed Oct 29, 2019 at 11:59 UTC ba0000678d6305a8137622845dd91fe5b22b47de
2 files changed +2 -5
modules/caddyhttp/errors.go
+2 -4
@@ -53,10 +53,8 @@ func Error(statusCode int, err error) HandlerError {
53 // HandlerError is a serializable representation of
54 // an error from within an HTTP handler.
55 type HandlerError struct {
56 - Err error // the original error value and message
57 - StatusCode int // the HTTP status code to associate with this error
58 - Message string // an optional message that can be shown to the user
59 - Recommendations []string // an optional list of things to try to resolve the error
56 + Err error // the original error value and message
57 + StatusCode int // the HTTP status code to associate with this error
58
59 ID string // generated; for identifying this error in logs
60 Trace string // produced from call stack
modules/caddyhttp/server.go
-1
@@ -349,7 +349,6 @@ func (*HTTPErrorConfig) WithError(r *http.Request, err error) *http.Request {
349 if handlerErr, ok := err.(HandlerError); ok {
350 repl.Set("http.error.status_code", strconv.Itoa(handlerErr.StatusCode))
351 repl.Set("http.error.status_text", http.StatusText(handlerErr.StatusCode))
352 - repl.Set("http.error.message", handlerErr.Message)
352 repl.Set("http.error.trace", handlerErr.Trace)
353 repl.Set("http.error.id", handlerErr.ID)
354 }