Rate limit errors explain when to retry
Why it matters
A 429 response with no Retry-After header and no client-side timing message forces users to guess when to try again, which produces two bad outcomes: they either give up, or they hammer retry and trigger a retry storm that extends the rate-limit window. RFC 6585 defines Retry-After precisely so clients and humans can coordinate backoff. Without it, the rate limiter is invisible to the user and indistinguishable from a 500, erasing the distinction between throttling and an outage.
Severity rationale
Low because rate limiting still protects the backend even without timing information; only the user experience degrades.
Remediation
Return Retry-After on every 429 response and surface the value on the client so users see a concrete wait time instead of a generic error. Match the header value to your limiter's window. Edit the rate-limit handler in middleware.ts or your API route:
return NextResponse.json(
{ error: 'Too many requests', retryAfter: 60 },
{ status: 429, headers: { 'Retry-After': '60' } }
)
On the client, branch on response.status === 429 and display Please wait ${retryAfter} seconds rather than the generic error component.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Error Handling Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from saas-error-handling·automated