diff --git a/hooks.go b/hooks.go index 7223bd19..6e401c06 100644 --- a/hooks.go +++ b/hooks.go @@ -33,7 +33,9 @@ func registerDefaultErrorHandler() error { "503": serviceUnavailable, "504": gatewayTimeout, } { - ErrorHandler(e, h) + if _, ok := ErrorMaps[e]; !ok { + ErrorHandler(e, h) + } } return nil }