-
Notifications
You must be signed in to change notification settings - Fork 572
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
Automatic request retries #1518
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment below, but looks great!
ptal @ob-stripe
return true; | ||
} | ||
|
||
if (statusCode == HttpStatusCode.Conflict) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth adding 503s here and non-POST
500s as recently came into stripe-node. I think that's the direction we're going, and we just haven't changed stripe-go yet.
65c093b
to
a6d3ed8
Compare
I've updated I also realized there were a few important bits missing, which I also updated:
ptal @brandur-stripe |
Phew! Glad you caught that one before shipping, haha. LGTM! |
r? @brandur-stripe @remi-stripe
cc @stripe/api-libraries
Add support for automatic request retries.
The implementation is based on stripe-go, so the retry conditions are the same: requests are retried on connection errors (timeouts) and 409's. Given the recent discussions in e.g. stripe/stripe-node#559, let me know if you want me to change the conditions (e.g. to retry on 500's).