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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Feature: Too many API requests should give a meaningful error #56

Open
sdalmeida opened this issue Jan 20, 2017 · 1 comment
Open
Labels
area: demo Regarding the index.html demo file accompanying this repository status: accepting prs type: feature

Comments

@sdalmeida
Copy link

If I try to parse a Github package.json via the url method, I get the following error message

screen shot 2017-01-20 at 1 22 09 pm

After debugging the error, I found out that it's caused by making "too many requests" to the Github API.

/**/angular.callbacks._1t({
  "meta": {
    "Content-Type": "application/javascript; charset=utf-8",
    "X-RateLimit-Limit": "60",
    "X-RateLimit-Remaining": "0",
    "X-RateLimit-Reset": "1484939293",
    "X-GitHub-Media-Type": "github.v3; format=json",
    "status": 403
  },
  "data": {
    "message": "API rate limit exceeded for xxx.xxx.xxx.xxx. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)",
    "documentation_url": "https://developer.github.com/v3/#rate-limiting"
  }
})

Would be nice if the error was more meaningful. Something like this would be nice

{
  "valid": "false",
  "critical":" Github API limit exceeded! Please wait a few minutes before making another request."
}
@LinusU
Copy link
Collaborator

LinusU commented Jan 20, 2017

This would be very nice, PR welcome :)

@JoshuaKGoldberg JoshuaKGoldberg added status: accepting prs type: feature area: demo Regarding the index.html demo file accompanying this repository labels Mar 28, 2024
@JoshuaKGoldberg JoshuaKGoldberg changed the title [Feature] Too many API requests should give a meaningful error 馃殌 Feature: Too many API requests should give a meaningful error Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: demo Regarding the index.html demo file accompanying this repository status: accepting prs type: feature
Projects
None yet
Development

No branches or pull requests

3 participants