Skip to content

Commit 9e53b0e

Browse files
rohitkg98aldas
authored andcommitted
fix status codes on RateLimiter deny and error
1 parent 6318c78 commit 9e53b0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

website/content/middleware/rate-limiter.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ config := middleware.RateLimiterConfig{
3333
return id, nil
3434
},
3535
ErrorHandler: func(context echo.Context, err error) error {
36-
return context.JSON(http.StatusTooManyRequests, nil)
36+
return context.JSON(http.StatusForbidden, nil)
3737
},
3838
DenyHandler: func(context echo.Context, identifier string,err error) error {
39-
return context.JSON(http.StatusForbidden, nil)
39+
return context.JSON(http.StatusTooManyRequests, nil)
4040
},
4141
}
4242

0 commit comments

Comments
 (0)