diff --git a/lib/transport/echo.go b/lib/transport/echo.go index 6b56d093..4f35276d 100644 --- a/lib/transport/echo.go +++ b/lib/transport/echo.go @@ -81,6 +81,10 @@ func CreateRateLimitMiddleware(requestsPerSecond int, burst int) echo.Middleware res := responses.TooManyRequestsError return context.JSON(res.HttpStatusCode, res) }, + DenyHandler: func(context echo.Context, identifier string,err error) error { + res := responses.TooManyRequestsError + return context.JSON(res.HttpStatusCode, res) + }, } return middleware.RateLimiterWithConfig(config)