-
Notifications
You must be signed in to change notification settings - Fork 736
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
GitHubAbuseLimitHandler#isError
fails to detect some secondary rate limit errors
#2009
Comments
FWIW I submitted a ticket to GitHub support to see if they would consider it a bug that there's no useful header in the response. We'll see. |
I got answers, and it's basically working as intended.
I was told my feedback would be forwarded to the relevant team, but the message is clear: at the moment, there are no plans to make this situation easier to detect than through parsing the response body. |
And neither using a status code?
…On Mon, Jan 20, 2025 at 5:03 PM Yoann Rodière ***@***.***> wrote:
FWIW I submitted a ticket to GitHub support to see if they would consider
it a bug that there's no useful header in the response. We'll see.
I got answers, and it's basically working as intended.
1. Not adding Retry-After is essentially obfuscation designed to
protect the service against abuse.
2. The gh-limited-by header is never returned by github.com (only some
GitHub Enterprise installs), and there are no plans to add it.
I was told my feedback would be forwarded to the relevant team, but the
message is clear: at the moment, there are no plans to make this situation
easier to detect than through parsing the response body.
—
Reply to this email directly, view it on GitHub
<#2009 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJYOBJRWIKDKAB67LHDFD32LUM3JAVCNFSM6AAAAABVHDXZUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBSG44DONBRGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Apparently not. Probably part of the obfuscation strategy. But then it's hard to ask for details about an obfuscation strategy :) I tried to push a bit but the position is clear: "not a bug, though we understand your position and will forward your concerns to relevant team." (I'm paraphrasing) I'd say we can hope for improvements, but not anytime soon, and we'd need contingency plans. FWIW something like this works around the issue: https://github.com/quarkusio/quarkus-github-lottery/pull/208/files#diff-0cdbca0be53fabaaac67caa063012bbbece2560b1a716c6d4b5c6f1447d8bc77 |
@bitwiseman hey! Would you be willing to accept an ad hoc patch similar to the checks @yrodiere is doing ^ to work around the issue? Would be hackyish until GitHub decides to do something about it (might be forever) but probably better than not handling this case properly? Thanks! |
Describe the bug
#1895 attempted to detect more errors related to secondary rate limits, but it seems there are more.
It appears GitHub APIs -- https://api.github.com/search/issues in particular, maybe more -- can hit a secondary limit and just return a 403 error, with no particular header indicating that a limit was reached. No
Retry-After
, nogh-limited-by
, nothing. Only the body response explains "You have exceeded a secondary rate limit. Please wait a few minutes before you try again". (and in fact waiting 30s/1min is enough).This, understandably, doesn't get caught by
GitHubAbuseLimitHandler#isError
, and results in the request simply failing.To Reproduce
Send the following request a few dozen times (or just a dozen when unauthenticated):
https://api.github.com/search/issues?sort=updated&order=desc&q=repo%3Ayrodiere%2Fquarkus-github-playground+is%3Aissue+is%3Aopen+label%3Atriage%2Fneeds-feedback%2Ctriage%2Fneeds-reproducer+label%3Aarea%2Fhibernate-search+updated%3A%3C2025-01-15T12%3A03%3A47.243460581
Obviously my actual use case is not to send the same request over and over, but it's enough to reproduce the problem.
Interestingly, you can just click that URL in your browser, refresh quickly a couple times, and you'll be able to observe the exact error I'm running into: HTTP 403 with no particular retry header.
See bottom of this messsage for more logs.
Expected behavior
Ideally, I'd expect such requests to be detected as secondary rate limit errors, and the client to just wait and retry. For my use case it's fine to wait a minute.
Failing that, I'd settle for a way to override
GitHubAbuseLimitHandler#isError
and implement some dirty logic based on the response body in there. But this method is currently package-protected.Desktop (please complete the following information):
Additional context
Here is a failing request/response with all details/headers. I got it using
-Djdk.httpclient.HttpClient.log=all
.I end up with this error, proving the secondary limit error wasn't detected:
The text was updated successfully, but these errors were encountered: