Skip to content

chore(cli): re-enable Sentry reporting for unclassified errors#14752

Open
FedeZara wants to merge 1 commit intoFedeZara/refactor/cli-error-disable-uncategorized-sentryfrom
FedeZara/refactor/cli-error-reenable-sentry
Open

chore(cli): re-enable Sentry reporting for unclassified errors#14752
FedeZara wants to merge 1 commit intoFedeZara/refactor/cli-error-disable-uncategorized-sentryfrom
FedeZara/refactor/cli-error-reenable-sentry

Conversation

@FedeZara
Copy link
Copy Markdown
Contributor

@FedeZara FedeZara commented Apr 8, 2026

Description

Removes the temporary UNCLASSIFIED error code and reverts catch-all handlers back to INTERNAL_ERROR (which is Sentry-reportable).

This is the final PR in the error classification effort started in #14749. It should be merged last, after all ~35 package migration PRs have landed, so that any remaining unclassified new Error(...) calls are treated as genuine internal errors worth investigating in Sentry.

Changes Made

  • Removed UNCLASSIFIED from CliError.Code
  • Changed default error code fallback from UNCLASSIFIEDINTERNAL_ERROR in:
    • cli.ts (CLI v1 top-level catch)
    • CliContext.ts (CLI v1 task runner)
    • withContext.tsreportError (CLI v2)

Testing

  • Existing tests pass (only changes default string literals)

@FedeZara FedeZara self-assigned this Apr 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

🌱 Seed Test Selector

Select languages to run seed tests for:

  • Python
  • TypeScript
  • Java
  • Go
  • Ruby
  • C#
  • PHP
  • Swift
  • Rust
  • OpenAPI
  • Postman

How to use: Click the ⋯ menu above → "Edit" → check the boxes you want → click "Update comment". Tests will run automatically and snapshots will be committed to this PR.

Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch 2 times, most recently from fd89650 to 6e6d684 Compare April 9, 2026 22:38
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch 2 times, most recently from 6172072 to ea44cc1 Compare April 9, 2026 23:14
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch 2 times, most recently from ab973cc to fd585dd Compare April 10, 2026 12:18
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from ea44cc1 to a1d4044 Compare April 10, 2026 12:18
return "ENVIRONMENT_ERROR";
}
return "UNCLASSIFIED";
return "INTERNAL_ERROR";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

use your code map

@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch from fd585dd to 630e15e Compare April 10, 2026 14:44
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from a1d4044 to 4221daf Compare April 10, 2026 14:45
this.code = code;
this.docsLink = docsLink;
}
export const CliError.Code = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Invalid syntax: export const CliError.Code = {...} is not valid TypeScript/JavaScript. Dot notation cannot be used in a const declaration outside of a namespace or class.

The original code had this inside a namespace CliError block. This refactor breaks the syntax. The code will fail to compile.

Fix: Either keep the namespace structure or use a different approach:

export namespace CliError {
    export const Code = {
        InternalError: "INTERNAL_ERROR",
        // ... rest of codes
    } as const;
    
    export type Code = (typeof Code)[keyof typeof Code];
}
Suggested change
export const CliError.Code = {
export namespace CliError {
export const Code = {

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from 4221daf to 9ddd177 Compare April 10, 2026 15:07
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch 2 times, most recently from 68c2b60 to 0549359 Compare April 10, 2026 16:20
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from 9ddd177 to de49afc Compare April 10, 2026 17:09
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch from 0549359 to 813f087 Compare April 10, 2026 17:09
Copy link
Copy Markdown
Contributor Author

FedeZara commented Apr 10, 2026

@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch from 813f087 to 21e744b Compare April 10, 2026 17:43
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from de49afc to 0bd6ba6 Compare April 10, 2026 17:43
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch from 21e744b to b9b9c99 Compare April 10, 2026 18:33
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from 0bd6ba6 to a6379df Compare April 10, 2026 18:33
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from a6379df to d2a8aa2 Compare April 10, 2026 18:42
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch from b9b9c99 to a67cf84 Compare April 10, 2026 18:42
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from d2a8aa2 to 3c229d7 Compare April 10, 2026 18:58
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch 2 times, most recently from 0b71fc4 to dc33e43 Compare April 10, 2026 19:42
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from 3c229d7 to 0ffbee0 Compare April 10, 2026 19:42
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch from dc33e43 to 7a7c757 Compare April 10, 2026 21:55
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from 0ffbee0 to 6933edf Compare April 10, 2026 21:55
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch from 7a7c757 to f473624 Compare April 10, 2026 22:16
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from 6933edf to a5478b0 Compare April 10, 2026 22:16
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-disable-uncategorized-sentry branch from f473624 to 41d0da0 Compare April 10, 2026 22:24
@FedeZara FedeZara force-pushed the FedeZara/refactor/cli-error-reenable-sentry branch from a5478b0 to 6a1d5d5 Compare April 10, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants