-
Notifications
You must be signed in to change notification settings - Fork 729
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
RateLimitHandler Bug #220
Comments
Any prove? Any logs? Any test case? What exception? |
Do you use Enterprise github? Could you provide PR with fix? |
First of all the old code looked like this (1.60)
... This is nearly the implementation of the current WAIT. It waits 10 seconds and then returns without an exception. The current branch handles the error and then still throws an IO exception Second. I am fairly new to github and i don't have enterprice github. Is it still possible to provide an PR? |
Please provide exception reason, not all exceptions should be waited. |
Exception in thread "main" java.lang.Error: java.io.IOException: {"message":"API rate limit exceeded for anschwar.","documentation_url":"https://developer.github.com/v3/#rate-limiting"} |
on email i see full stacktrace
|
Yes I posted the full one but then i mentioned that you only requested the reason so I edited my comment. However this seems for me to be a consequence of the rate limit. If you think the behavior of the API is correct, I am ok with it |
The logic was the next, if you pass wrong user and it not authorised (403) it should throw exception either you will be unable to stop this connection and change user. |
I am able to retrieve results (so my credentials are ok) until a certain point. I have debugged the code and saw that the handler waits certain time until it should return to work again. But this never happens because the code checks the result which has been received before waiting and then throws the exception which imo seems to be wrong. |
I found this in the official github api documentation: Once you go over the rate limit you will receive an error response: HTTP/1.1 403 Forbidden { The 403 is returned if the rate limit is reached |
Issue #220. If RateLimitHandler returns normally, it should retry.
Fixed in 1.72. |
Hi,
the RateLimitHandler does not to work as intended.
If using the WAIT implementation the API will still throw an exception and terminate.
The reason therefore is that there is no return statement after the handler execute its onError method.
The problem is allocated in the handleApiError method of the Requester.
https://github.com/kohsuke/github-api/blob/master/src/main/java/org/kohsuke/github/Requester.java
The text was updated successfully, but these errors were encountered: