You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At times when Github Rate Limiting kicks in, Octokit starts throwing Octokit::Forbidden, usually it is TooManyRequests or AbuseDetected
In such cases it is help to get the Octokit::RateLimit so the consumer can appropriate take action of retrying the error ( for example using the resets_at / resets_in to trigger retry after the prescribed time )
For AbuseDetected we can also expose Retry-After from the response headers
If this seems something that have chances of merging, I can submit a PR.
From the surface, the changes seems simple, just need to modify the error initialiser
The text was updated successfully, but these errors were encountered:
jatindhankhar
changed the title
[Feature Request] Return Octokit::RateLimit struct as context for 401 / Forbidden error for better error handling
[Feature Request] Return Octokit::RateLimit struct as context for 401 / Forbidden errors to have better error handling
Jun 12, 2020
At times when Github Rate Limiting kicks in, Octokit starts throwing
Octokit::Forbidden
, usually it isTooManyRequests
orAbuseDetected
In such cases it is help to get the
Octokit::RateLimit
so the consumer can appropriate take action of retrying the error ( for example using theresets_at
/resets_in
to trigger retry after the prescribed time )For
AbuseDetected
we can also exposeRetry-After
from the response headersIf this seems something that have chances of merging, I can submit a PR.
From the surface, the changes seems simple, just need to modify the error initialiser
lib/octokit/error.rb
So consumer can use it
The text was updated successfully, but these errors were encountered: