-
Notifications
You must be signed in to change notification settings - Fork 1
Implement rate-limit handling #11
Copy link
Copy link
Open
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignCampaign: Official Campaignarea:httppriority:p2type:feature
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignCampaign: Official Campaignarea:httppriority:p2type:feature
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
When the API returns HTTP 429, the SDK should parse the
Retry-Afterheader (seconds) and either automatically wait and retry (if withinmax_retries) or raiseRateLimitErrorwith the wait time attached. The caller should never need to implement their own 429 backoff.Proposed Steps
Retry-Afterheader (integer seconds) and attach it to theRateLimitError.max_retriesis not exhausted, sleep forretry_afterseconds then retry.asyncio.sleepinstead oftime.sleep.Acceptance Criteria
RateLimitErrorwith aretry_afterattribute.Retry-Afterseconds before the next attempt.Retry-Afteris absent, the client falls back to exponential backoff.