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

Consider using httr2 for more robust HTTP requests #1

Open
slowkow opened this issue Aug 21, 2023 · 1 comment
Open

Consider using httr2 for more robust HTTP requests #1

slowkow opened this issue Aug 21, 2023 · 1 comment

Comments

@slowkow
Copy link
Owner

slowkow commented Aug 21, 2023

Sometimes jsonlite::read_json() does not succeed when fetching resources from https://api.github.com

So, perhaps we should try making these requests with httr2 instead, so we can automatically retry failed requests.

See here for more details: https://httr2.r-lib.org/reference/req_retry.html

@slowkow
Copy link
Owner Author

slowkow commented Aug 21, 2023

I think I might finally understand the reason for the recurrent failures on GitHub Actions (only on macOS, not on Windows or Linux).

We cannot control the IP address used by GH Actions. Sometimes the same one is used as a previously workflow. We have a limit of 60 requests per hour for URLs like api.github.com so we are probably reaching the limit after running multiple workflows.

This package might be the easiest way to enable users to use Github tokens to overcome the limit of 60 requests per hour:

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

No branches or pull requests

1 participant