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

Better error message when GitHub REST API fails #951

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

lionello
Copy link
Member

Description

When GitHub API gets throttled the CLI just prints Error: 403 Forbidden, without much context. This PR prints the actual error message (if available) for better diagnosis.

Checklist

  • I have performed a self-review of my code
  • I have added appropriate tests
  • I have updated the Defang CLI docs and/or README to reflect my changes, if necessary

Copy link
Member

@jordanstephens jordanstephens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to commit this as-is, that's OK, but I think we could push this a little further and try reading the rate limit headers and comparing them. Let me know if you want me to take a swing at it.

src/cmd/cli/command/version.go Show resolved Hide resolved
@lionello lionello merged commit c921c49 into main Jan 13, 2025
12 checks passed
@lionello lionello deleted the lio/debug-github-api branch January 13, 2025 19:47
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.

2 participants