1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-12 01:22:21 +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 code = he.Code
msg = he.Message msg = he.Message
if he.Internal != nil { if he.Internal != nil {
msg = fmt.Sprintf("%v, %v", err, he.Internal) err = fmt.Errorf("%v, %v", err, he.Internal)
} }
} else if e.Debug { } else if e.Debug {
msg = err.Error() msg = err.Error()