We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3743d8d commit 1013207Copy full SHA for 1013207
app/handlers/index_handler.go app/handlers/global_handler.go
@@ -28,9 +28,9 @@ func GlobalErrorHandler() echo.HTTPErrorHandler {
28
if he, ok := err.(*echo.HTTPError); ok {
29
c.Logger().Errorf("Error: %v", he.Message)
30
}
31
- switch err.(type) {
+ switch err := err.(type) {
32
case *echo.HTTPError:
33
- code := err.(*echo.HTTPError).Code
+ code := err.Code
34
render.EchoTempl(c, errors.View(code))
35
default:
36
render.EchoTempl(c, errors.View(500))
0 commit comments