mirror of
https://github.com/labstack/echo.git
synced 2025-07-17 01:43:02 +02:00
2
echo.go
2
echo.go
@ -290,6 +290,8 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
|
|||||||
if he, ok := err.(*HTTPError); ok {
|
if he, ok := err.(*HTTPError); ok {
|
||||||
code = he.Code
|
code = he.Code
|
||||||
msg = he.Message
|
msg = he.Message
|
||||||
|
} else if e.Debug {
|
||||||
|
msg = err.Error()
|
||||||
} else {
|
} else {
|
||||||
msg = http.StatusText(code)
|
msg = http.StatusText(code)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user