Skip to content

Commit

Permalink
Send error details when Echo#Debug is true, labstack#817
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <[email protected]>
  • Loading branch information
vishr committed Sep 21, 2017
1 parent b7c4ccf commit b5de47f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,11 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
if he, ok := err.(*HTTPError); ok {
code = he.Code
msg = he.Message
} else if e.Debug {
msg = err.Error()
if he.Inner != nil {
msg = fmt.Sprintf("%v, %v", err, he.Inner)
}
} else if e.Debug {
msg = err.Error()
} else {
msg = http.StatusText(code)
}
Expand Down

0 comments on commit b5de47f

Please sign in to comment.