mirror of
https://github.com/labstack/echo.git
synced 2024-11-28 08:38:39 +02:00
Send error details when Echo#Debug is true, #817
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
parent
b7c4ccf8f3
commit
b5de47f165
4
echo.go
4
echo.go
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user