Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic retry policy #46

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Add automatic retry policy #46

wants to merge 1 commit into from

Conversation

mattt
Copy link
Member

@mattt mattt commented Aug 4, 2023

This PR refactors the client's internal fetch method to automatically retry requests as appropriate (429 status code, as well as 5xx errors for GET requests). If the server sends a Retry-After header, that value is used. Otherwise, the function delays for a configured interval with exponential backoff and jitter.

This should all be in line with the retry logic in the Python client.

@mattt
Copy link
Member Author

mattt commented Aug 10, 2023

Blocked by test cases not supporting different responses.

@mattt mattt marked this pull request as draft August 10, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant