mirror of
https://github.com/laurentS/slowapi.git
synced 2026-03-13 09:10:20 +08:00
Fix typo in rate limit handler
This commit is contained in:
@@ -72,7 +72,7 @@ def _rate_limit_exceeded_handler(request: Request, exc: RateLimitExceeded) -> Re
|
||||
that was hit. If no limit is hit, the countdown is added to headers.
|
||||
"""
|
||||
response = JSONResponse(
|
||||
{"error": f"Rate limit exceeded: {exc.limit}"}, status_code=429
|
||||
{"error": f"Rate limit exceeded: {exc.detail}"}, status_code=429
|
||||
)
|
||||
response = request.app.state.limiter._inject_headers(
|
||||
response, request.state.view_rate_limit
|
||||
|
||||
Reference in New Issue
Block a user