summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-10-29 11:59:08 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-10-29 11:59:08 -0600
commitba0000678d6305a8137622845dd91fe5b22b47de (patch)
treeac7332c0bc08165a6ee8314867703365c20e970f /modules
parentc4c45f8e01bd59b556eaa84f4d6c6ec529e01acb (diff)
Remove unused fields from HandlerError
Diffstat (limited to 'modules')
-rw-r--r--modules/caddyhttp/errors.go6
-rw-r--r--modules/caddyhttp/server.go1
2 files changed, 2 insertions, 5 deletions
diff --git a/modules/caddyhttp/errors.go b/modules/caddyhttp/errors.go
index db64399..584f56f 100644
--- a/modules/caddyhttp/errors.go
+++ b/modules/caddyhttp/errors.go
@@ -53,10 +53,8 @@ func Error(statusCode int, err error) HandlerError {
// HandlerError is a serializable representation of
// an error from within an HTTP handler.
type HandlerError struct {
- Err error // the original error value and message
- StatusCode int // the HTTP status code to associate with this error
- Message string // an optional message that can be shown to the user
- Recommendations []string // an optional list of things to try to resolve the error
+ Err error // the original error value and message
+ StatusCode int // the HTTP status code to associate with this error
ID string // generated; for identifying this error in logs
Trace string // produced from call stack
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go
index c82f74d..34c2b54 100644
--- a/modules/caddyhttp/server.go
+++ b/modules/caddyhttp/server.go
@@ -349,7 +349,6 @@ func (*HTTPErrorConfig) WithError(r *http.Request, err error) *http.Request {
if handlerErr, ok := err.(HandlerError); ok {
repl.Set("http.error.status_code", strconv.Itoa(handlerErr.StatusCode))
repl.Set("http.error.status_text", http.StatusText(handlerErr.StatusCode))
- repl.Set("http.error.message", handlerErr.Message)
repl.Set("http.error.trace", handlerErr.Trace)
repl.Set("http.error.id", handlerErr.ID)
}