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

docs: show information about github rate limits when erroring due to 403 #2856

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

jdx
Copy link
Owner

@jdx jdx commented Oct 28, 2024

Fixes #2428

@jdx jdx enabled auto-merge (squash) October 28, 2024 15:27
@jdx jdx force-pushed the rate-limit-warning branch 2 times, most recently from 1e95f3d to 18ce1bd Compare October 28, 2024 15:28
@jdx jdx disabled auto-merge October 28, 2024 15:31
@jdx jdx force-pushed the rate-limit-warning branch from 18ce1bd to 51c3d03 Compare October 28, 2024 15:37
@jdx jdx enabled auto-merge (squash) October 28, 2024 15:38
Copy link

codacy-production bot commented Oct 28, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.08% 54.17%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (693f39b) 19799 15454 78.05%
Head commit (36ca312) 19819 (+20) 15486 (+32) 78.14% (+0.08%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#2856) 24 13 54.17%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@powerman
Copy link
Contributor

I've just hit this issue because token I've set years ago in my shell config is expired.
Probably it makes sense to mention this possible reason in error message/docs in case token is set.

@jdx
Copy link
Owner Author

jdx commented Oct 29, 2024

I don't want to make assumptions about HTTP error codes. 403 is an exception because it will be extremely common.

@powerman
Copy link
Contributor

powerman commented Oct 29, 2024

You think 401 is less common? 😄

$ GITHUB_API_TOKEN=bad mise use [email protected]
mise ERROR Failed to install [email protected]
mise ERROR Failed to install with ubi 'ubi:jdx/[email protected]': HTTP status client error (401 Unauthorized) for url (https://api.github.com/repos/jdx/usage/releases/tags/v0.12.0)
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information

@jdx
Copy link
Owner Author

jdx commented Oct 29, 2024

401 means they already set GITHUB_TOKEN at one point so they should be able to figure it out

@jdx jdx force-pushed the rate-limit-warning branch from f8667a6 to 36ca312 Compare November 6, 2024 00:23
@jdx jdx merged commit e5a9681 into main Nov 6, 2024
14 checks passed
@jdx jdx deleted the rate-limit-warning branch November 6, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

With Ubi backend i got HTTP status client error forbidden
2 participants