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

fix(retry): Retry requests after the x-ratelimit-reset time, not exactly at it. #635

Merged
merged 3 commits into from
Oct 25, 2023

Conversation

jyasskin
Copy link
Contributor

@jyasskin jyasskin commented Oct 24, 2023

Addresses #599, although it won't handle the case where the client and server actually have different times.

@ghost ghost added this to Inbox in JS Oct 24, 2023
@jyasskin jyasskin changed the title Retry requests after the x-ratelimit-reset time, not exactly at it. fix(retry): Retry requests after the x-ratelimit-reset time, not exactly at it. Oct 24, 2023
@gr2m gr2m added the Type: Bug Something isn't working as documented label Oct 24, 2023
@ghost ghost moved this from Inbox to Bugs in JS Oct 24, 2023
Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

Fix looks good, can you update the tests accordingly?

src/index.ts Outdated Show resolved Hide resolved
jyasskin and others added 2 commits October 24, 2023 09:24
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
@jyasskin
Copy link
Contributor Author

I've adjusted the one test I found that seems to exercise this timing.

Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

Great pull request, thank you 💐

@gr2m gr2m merged commit 39c0080 into octokit:main Oct 25, 2023
8 checks passed
JS automation moved this from Bugs to Done Oct 25, 2023
@github-actions
Copy link
Contributor

🎉 This PR is included in version 8.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@jyasskin jyasskin deleted the retry-after-reset branch October 25, 2023 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Type: Bug Something isn't working as documented
Projects
No open projects
JS
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants