minder
minder copied to clipboard
Handle GitHub throttling errors properly
GitHub occasionally throttles calls returning a wealth of information on how to correctly handle the issue
403 API rate limit of 5000 still exceeded until 2024-10-02 09:30:01 +0000 UTC, not making remote request. [rate reset in 5m35s]
We do not handle throttling errors form GitHub properly.
- expose throttling error with a specialized error type wrapping all necessary information
- make use of the information returned to decide how to react from the upper layers
We should add a metric to record how often this happens.
The GitHub error headers also include how much quota is left; it would be good to expose a histogram of how much quota is left across the different calls with different organizations. (Don't do this per-organization -- there will be too many metrics.