1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

logs the internal error message instead of returning it (#1173)

This commit is contained in:
Andrei Serban 2018-08-02 14:11:20 -07:00 committed by Vishal Rana
parent 76d8adbf2d
commit 2017e5e541

View File

@ -326,7 +326,7 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
code = he.Code
msg = he.Message
if he.Internal != nil {
msg = fmt.Sprintf("%v, %v", err, he.Internal)
err = fmt.Errorf("%v, %v", err, he.Internal)
}
} else if e.Debug {
msg = err.Error()