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 rate limit exhaustion as configuration error #2795

Closed
wants to merge 1 commit into from

Conversation

nickfyson
Copy link
Contributor

@nickfyson nickfyson commented Mar 5, 2025

This PR adds a new CliConfigErrorCategory of RateLimitExhausted to the cli-errors module. This will ensure that such errors are treated as configuration errors, and hence not as an indicator of availability with the CodeQL Action.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@Copilot Copilot bot review requested due to automatic review settings March 5, 2025 14:19
@nickfyson nickfyson requested a review from a team as a code owner March 5, 2025 14:19
@nickfyson nickfyson changed the title add rate limit exhaustion as configuration error handle rate limit exhaustion as configuration error Mar 5, 2025

Choose a reason for hiding this comment

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

PR Overview

This PR introduces a new error category, RateLimitExhausted, to the cli-errors module so that API rate limit errors are treated as configuration errors.

  • Added RateLimitExhausted to the CliConfigErrorCategory enum in both TypeScript and JavaScript files.
  • Added regular expression candidates to match rate limit exhaustion error messages in both code paths.

Reviewed Changes

File Description
src/cli-errors.ts Added RateLimitExhausted enum value and its regex candidate.
lib/cli-errors.js Added RateLimitExhausted property and its regex candidate to object.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@nickfyson nickfyson closed this Mar 5, 2025
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.

1 participant