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

Handle GitHub's secondary rate limit #232

Open
MaddoScientisto opened this issue Oct 19, 2023 · 0 comments
Open

Handle GitHub's secondary rate limit #232

MaddoScientisto opened this issue Oct 19, 2023 · 0 comments
Labels
status: pinned Should not be labeled as stale type: feature New feature or feature request

Comments

@MaddoScientisto
Copy link

If a repository has too many labels (we have 190) the script hits a secondary rate limit and aborts around page 8.
The script should implement throttling to avoid that

Error: ✗ {"message":"You have exceeded a secondary rate limit. Please wait a few minutes before you try again. If you reach out to GitHub Support for help, please include the request ID C877:3596:1DB78AD:3C701FD:6531505C.","statusCode":403,"headers":{"server":"GitHub.com","date":"Thu, 19 Oct 2023 15:50:53 GMT","content-type":"application/json; charset=utf-8","transfer-encoding":"chunked","retry-after":"1","access-control-expose-headers":"ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset","access-control-allow-origin":"*","x-github-media-type":"github.v3; format=json","strict-transport-security":"max-age=31536000; includeSubdomains; preload","x-frame-options":"deny","x-content-type-options":"nosniff","x-xss-protection":"0","referrer-policy":"origin-when-cross-origin, strict-origin-when-cross-origin","content-security-policy":"default-src 'none'; base-uri 'self'; child-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.githubcopilot.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events objects-origin.githubusercontent.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com support.github.com; img-src 'self' data: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.com/assets-cdn/worker/ gist.github.com/assets-cdn/worker/","vary":"Accept-Encoding, Accept, X-Requested-With","x-github-request-id":"C877:3596:1DB78AD:3C701FD:6531505C","connection":"close"},"body":{"documentation_url":"https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#secondary-rate-limits","message":"You have exceeded a secondary rate limit. Please wait a few minutes before you try again. If you reach out to GitHub Support for help, please include the request ID C877:3596:1DB78AD:3C701FD:6531505C."},"method":"POST","endpoint":"/repos/redacted/redacted/labels"}
@EndBug EndBug added type: feature New feature or feature request status: pinned Should not be labeled as stale labels Oct 20, 2023
@EndBug EndBug changed the title Script hits github's secondary rate limit if there are too many labels to page through Handle GitHub's secondary rate limit Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: pinned Should not be labeled as stale type: feature New feature or feature request
Projects
None yet
Development

No branches or pull requests

2 participants