Skip to content

Treat missing pack errors as configuration errors #3004

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

Merged
merged 1 commit into from
Aug 6, 2025

Conversation

mbg
Copy link
Member

@mbg mbg commented Aug 6, 2025

This extends the classification of CLI errors with a case for missing pack errors, so that they get classed as configuration errors.

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.

@mbg mbg requested a review from henrymercer August 6, 2025 11:10
@mbg mbg requested a review from a team as a code owner August 6, 2025 11:10
@Copilot Copilot AI review requested due to automatic review settings August 6, 2025 11:10
Copy link
Contributor

@Copilot 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 adds support for treating "not found in registry" errors from the CodeQL CLI as configuration errors rather than generic failures. This enables better error handling and categorization when CodeQL packs cannot be found in registries.

  • Adds a new configuration error category NotFoundInRegistry to the CLI error classification system
  • Defines a regex pattern to match "not found in the registry" error messages from the CLI

Reviewed Changes

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

File Description
src/cli-errors.ts Adds NotFoundInRegistry enum value and regex pattern for CLI error classification
lib/cli-errors.js Generated JavaScript equivalent of the TypeScript changes

@henrymercer henrymercer enabled auto-merge August 6, 2025 11:19
@henrymercer henrymercer merged commit b1228d0 into main Aug 6, 2025
282 checks passed
@henrymercer henrymercer deleted the mbg/missing-query-pack-config-error branch August 6, 2025 11:22
@github-actions github-actions bot mentioned this pull request Aug 7, 2025
8 tasks
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