Consider using httr2 for more robust HTTP requests
slowkow opened this issue · comments
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
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: