Skip to content
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

Exceeding GitHubs Rate Limit #59

Closed
Morten-Renner opened this issue Feb 11, 2023 · 0 comments · Fixed by #60
Closed

Exceeding GitHubs Rate Limit #59

Morten-Renner opened this issue Feb 11, 2023 · 0 comments · Fixed by #60
Assignees
Labels
bug Something isn't working

Comments

@Morten-Renner
Copy link
Collaborator

Morten-Renner commented Feb 11, 2023

Describe the bug
GitHub is rate limiting its API and responds with 403 to Hydrogens request to https://api.github.com/repos/zpeanut/hydrogen/commits/master

To Reproduce
Steps to reproduce the behavior:

  1. Open main menu
  2. click on singe player
  3. go back to main menu
  4. repeat step 2 and 3 ~30 times

Expected behavior
Not exceeding the rate limit

Actual behavior
Exceeding rate limit

Log

[22:15:22] [Client thread/INFO]: [me.peanut.hydrogen.utils.HTTPUtil:getCurrentCommitHash:27]: java.io.IOException: Server returned HTTP response code: 403 for URL: https://api.github.com/repos/zpeanut/hydrogen/commits/master
[22:15:22] [Client thread/INFO]: [me.peanut.hydrogen.utils.HTTPUtil:getCurrentCommitHash:27]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900)
[22:15:22] [Client thread/INFO]: [me.peanut.hydrogen.utils.HTTPUtil:getCurrentCommitHash:27]: at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:92)
[22:15:22] [Client thread/INFO]: [me.peanut.hydrogen.utils.HTTPUtil:getCurrentCommitHash:27]: at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1490)
[22:15:22] [Client thread/INFO]: [me.peanut.hydrogen.utils.HTTPUtil:getCurrentCommitHash:27]: at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1488)
[22:15:22] [Client thread/INFO]: [me.peanut.hydrogen.utils.HTTPUtil:getCurrentCommitHash:27]: at java.security.AccessController.doPrivileged(Native Method)
[22:15:22] [Client thread/INFO]: [me.peanut.hydrogen.utils.HTTPUtil:getCurrentCommitHash:27]: at java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:784)
[22:15:22] [Client thread/INFO]: [me.peanut.hydrogen.utils.HTTPUtil:getCurrentCommitHash:27]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1487)
[22:15:22] [Client thread/INFO]: [me.peanut.hydrogen.utils.HTTPUtil:getCurrentCommitHash:27]: at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
[22:15:22] [Client thread/INFO]: [me.peanut.hydrogen.utils.HTTPUtil:getCurrentCommitHash:27]: at java.net.URL.openStream(URL.java:1067)

GitHub API Response
{"message":"API rate limit exceeded for <my ip here>. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"}

Desktop (please complete the following information):

  • OS: Windows 10
  • Version: v1.12.5
  • Other mods: none
@Morten-Renner Morten-Renner added the bug Something isn't working label Feb 11, 2023
@Morten-Renner Morten-Renner self-assigned this Feb 11, 2023
@Morten-Renner Morten-Renner mentioned this issue Feb 11, 2023
Merged
zPeanut added a commit that referenced this issue Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant