Skip to content

Commit 1678da5

Browse files
committed
Closes #1006
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent f2bc680 commit 1678da5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

echo.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,9 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
332332
msg = Map{"message": msg}
333333
}
334334

335+
e.Logger.Error(err)
336+
337+
// Send response
335338
if !c.Response().Committed {
336339
if c.Request().Method == HEAD { // Issue #608
337340
err = c.NoContent(code)
@@ -342,8 +345,6 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) {
342345
e.Logger.Error(err)
343346
}
344347
}
345-
346-
e.Logger.Error(err)
347348
}
348349

349350
// Pre adds middleware to the chain which is run before router.

0 commit comments

Comments
 (0)