-
Notifications
You must be signed in to change notification settings - Fork 18
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
Retry all non 400/401/403 errors instead of only 500s #5
Conversation
BREAKING CHANGE: Now retrying all non 400/401/403 errors instead of only 500s
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.
Changes look good, but we should also update the README. Instead of
Implements request retries for server error responses.
We should say sth like
Implements request retries for request error status codes other than 400, 4001 and 403?
I’m still not sure about the 404 🤔 I think the replication lag problem is mostly a problem when handling webhook events and I think we should solve it there. Otherwise I imagine people writing tests for their apps with deliberate 404s and then wonder why Octokit sends the same request again :/
Maybe we should add the 404 to the ignore codes and document how you can have retries on a per-request basis (like we already do)
What do you think?
We should also ignore https://runkit.com/gr2m/octokit---conditional-request-example/1.0.0 |
I think you're right. I changed it and also documented how to override the ignore codes.
I didn't expect 3xx to be treated as errors at all. I've updated it so it doesn't retry 3xx. |
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.
looking great!
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
BREAKING CHANGE: Now retrying all non 400/401/403 errors instead of only 500s