Repository navigation
feat: add Retry-After headers and rate limit documentation to every 429 response (#272) - #581
Open
mansur-codes wants to merge 1 commit into
Open
mansur-codes wants to merge 1 commit into
mansur-codes wants to merge 1 commit into
Conversation
|
@mansur-codes Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(api): add Retry-After headers and rate limit documentation to every 429 response (#272)
Summary
Retry-Afterseconds header along withX-RateLimit-Limit,X-RateLimit-Remaining, andX-RateLimit-Resetto all 429 responses.{ "code": "rate_limited", "retryAfter": <seconds>, "message": "Rate limit exceeded. Retry after <seconds> seconds." }, ensuringretryAftermatches theRetry-Afterheader value exactly.## Rate Limitssection toREADME.mddocumenting exact limits per route class (public routes: 100/min per IP, authenticated routes: 60/min per API key, write routes: 10/min per payTo).components.responses.TooManyRequestswith rate limit headers and response schema. Added 429 response references to all non-exempt routes (/venues/registry,/supported,/verify,/settle, andGET/POST/graphql), while preserving exemption on probe routes (/live,/ready). Regeneratedopenapi.json.tests/rateLimit.test.tsto assert 429 header/body parity, probe route exemptions, and programmatically compare documentedREADME.mdlimit values against configured values inconfig.rateLimit.Related issue
Closes #272
Type of change
Checklist
npx tsc --noEmitpassesnpm run buildpasses