mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
fix: Return only on 500 errors in error handler
This commit is contained in:
parent
26a322a5ea
commit
bb0e8495d3
@ -5,6 +5,7 @@ import (
|
|||||||
"github.com/onsonr/sonr/gateway/context"
|
"github.com/onsonr/sonr/gateway/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// AI! Fix this error handler to only return on 500 errors
|
||||||
func ErrorHandler(err error, c echo.Context) {
|
func ErrorHandler(err error, c echo.Context) {
|
||||||
if he, ok := err.(*echo.HTTPError); ok {
|
if he, ok := err.(*echo.HTTPError); ok {
|
||||||
// Log the error if needed
|
// Log the error if needed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user