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

make request timeout errors eligible for retry #1104

Merged
merged 1 commit into from
Jan 15, 2021

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Jan 5, 2021

fixes #1058
r? @tjfontaine-stripe @ctrudeau-stripe

Presently errors that result from the node http request timeout are not eligible to be retried.

I doubt this is deliberate and it seems like these requests should generally be retried, the same as ECONNRESET or any other sort of connection error.

This is technically a behavior change, so my inclination is to wait until the next major version, since there are a lot of open network-related issues and it would be good to address several of them.

Copy link
Contributor

@ctrudeau-stripe ctrudeau-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great tests. Nice refactor to account for ETIMEDOUT error.

@tjfontaine-stripe
Copy link

similarly this lgtm, though I think we should consider a requestDurationTimeout in addition to req.setTimeout behavior here.

@richardm-stripe richardm-stripe merged commit e89cc76 into master Jan 15, 2021
@richardm-stripe richardm-stripe deleted the richardm-retry-request-timeouts branch January 15, 2021 16:43
This was referenced Mar 10, 2021
This was referenced Mar 14, 2021
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.

maxNetworkRetries setting does not work
3 participants