KEMBAR78
utils/github/api: print more info on rate limits by Bo98 · Pull Request #20879 · Homebrew/brew · GitHub
Skip to content

Conversation

@Bo98
Copy link
Member

@Bo98 Bo98 commented Oct 14, 2025

GitHub rate limits aren't quite as simple as there being one limit for everyone. The limit varies depending on what type of token it is, whether you are even authenticated and what type of resource you are hitting. It's probably worthwhile outputting all of that.

I've not really tested this since I'd need to spam requests to get my IP rate limited.

@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 23:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances GitHub API rate limit error messages by including additional information about the specific rate limit that was exceeded. The change improves debugging by showing the resource type and limit value when rate limits are hit.

  • Updated RateLimitExceededError to accept and display resource type and limit information
  • Modified the error message format to include resource-specific rate limit details
  • Changed the constructor signature to use keyword arguments for better clarity

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Bo98 Bo98 force-pushed the api-ratelimit-message branch from c0128fb to c04010e Compare October 14, 2025 23:07
@Bo98 Bo98 force-pushed the api-ratelimit-message branch from c04010e to 0566b57 Compare October 14, 2025 23:07
@Bo98 Bo98 added this pull request to the merge queue Oct 15, 2025
Merged via the queue into main with commit 500ec48 Oct 15, 2025
39 checks passed
@Bo98 Bo98 deleted the api-ratelimit-message branch October 15, 2025 02:23
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