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

feat(backoff): implement backoff when ApiError is called ? #69

Closed
wants to merge 1 commit into from

Conversation

martintamare
Copy link

I think auto retry would be a nice feature.

What do you think about the following approach ?

It use backoff and by default has the same behavior as the old client.
If someone would use auto_retry=4 in client init, if call would rise an APIError, it wall autoretry.

Tests are not done yet but will be, if you want it interesting.

@rbeuque74
Copy link
Member

Hello,
Thanks for your proposal.
The current implementation would imply that all APIError, such as 400 Bad Request would be retried, which is not something we want.

A new implementation of the retry that would retry network error, or internal server error could be accepted.

Thanks
Romain

@rbeuque74 rbeuque74 closed this Mar 29, 2023
@martintamare martintamare mentioned this pull request Mar 29, 2023
@martintamare
Copy link
Author

I added exceptions as a parameter and created another PR.

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.

2 participants