Skip to content

Commit b5de47f

Browse files
committed
Send error details when Echo#Debug is true, #817
Signed-off-by: Vishal Rana <[email protected]>
1 parent b7c4ccf commit b5de47f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

echo.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,11 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
320320
if he, ok := err.(*HTTPError); ok {
321321
code = he.Code
322322
msg = he.Message
323-
} else if e.Debug {
324-
msg = err.Error()
325323
if he.Inner != nil {
326324
msg = fmt.Sprintf("%v, %v", err, he.Inner)
327325
}
326+
} else if e.Debug {
327+
msg = err.Error()
328328
} else {
329329
msg = http.StatusText(code)
330330
}

0 commit comments

Comments
 (0)