We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1fe7d23 commit 8554e63Copy full SHA for 8554e63
1 file changed
website/docs/guide/error-handling.md
@@ -71,7 +71,8 @@ func customHTTPErrorHandler(err error, c echo.Context) {
71
}
72
73
code := http.StatusInternalServerError
74
- if he, ok := err.(*echo.HTTPError); ok {
+ var he *echo.HTTPError
75
+ if errors.As(err, &he) {
76
code = he.Code
77
78
c.Logger().Error(err)
0 commit comments