mirror of
https://github.com/labstack/echo.git
synced 2025-07-13 01:30:31 +02:00
Not sending internal errors
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
4
echo.go
4
echo.go
@ -289,9 +289,9 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
|
|||||||
code = he.Code
|
code = he.Code
|
||||||
msg = he.Message
|
msg = he.Message
|
||||||
} else {
|
} else {
|
||||||
msg = err.Error()
|
msg = http.StatusText(code)
|
||||||
}
|
}
|
||||||
if reflect.TypeOf(msg).Kind() != reflect.Ptr {
|
if _, ok := msg.(string); ok {
|
||||||
msg = Map{"message": msg}
|
msg = Map{"message": msg}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user