Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

error on line 87 #21

Open
hugeblank opened this issue Jan 7, 2018 · 5 comments
Open

error on line 87 #21

hugeblank opened this issue Jan 7, 2018 · 5 comments

Comments

@hugeblank
Copy link
Contributor

After cloning so many times I get this error message:
github:87: Could not get github API from repos/hugeblank/BagelBot/git/trees/unstable-as
What would be the cause of this? the repo is in existence, and I had no prior problems with it. I have also found that after a 5-10 minute wait that this issue fixes itself, but it eventually occurs again.

@eric-wieser
Copy link
Owner

You're hitting the GitHub rate limiting. It would be good if I could give a better error message, but from what I remember the http functions don't give you the status code.

Authenticating should up your allowed rate

@hugeblank
Copy link
Contributor Author

yeah that would explain it. Thanks for the info, I figured it would have something to do with that.

@danports
Copy link
Contributor

Thanks guys - I ran into the same thing and this issue was really helpful. A simple program like this can display your rate limit status (without authentication):

print(http.get("https://api.github.com/rate_limit", nil).readAll())

@eric-wieser It might be helpful to modify the text of the error raised to suggest rate limiting as a possible cause and authentication as the solution.

@eric-wieser
Copy link
Owner

@danports: Would welcome a patch that catches that error with pcall, and then checks the rate_limit to see if that's the cause

@danports
Copy link
Contributor

That's one option...I was thinking something even simpler to start with, i.e. just adding a suggestion to check your rate limit to the string passed to error, without adding any new logic.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants