Skip to content

Commit 6172072

Browse files
committed
chore(cli): re-enable Sentry reporting for unclassified errors
Remove the temporary UNCLASSIFIED error code and revert catch-all handlers back to INTERNAL_ERROR (which is Sentry-reportable). This should be merged last, after all CliError classification branches. Made-with: Cursor
1 parent 6e6d684 commit 6172072

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

packages/cli/task-context/src/CliError.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ export declare namespace CliError {
1111
| "VALIDATION_ERROR"
1212
| "NETWORK_ERROR"
1313
| "AUTH_ERROR"
14-
| "CONFIG_ERROR"
15-
| "UNCLASSIFIED";
14+
| "CONFIG_ERROR";
1615
}
1716

1817
const SENTRY_REPORTABLE_CODES: ReadonlySet<CliError.Code> = new Set([
@@ -40,8 +39,7 @@ function isNodeVersionError(error: unknown): boolean {
4039
/**
4140
* Resolves the effective error code: explicit override wins,
4241
* then auto-detects from known error types,
43-
* and falls back to UNCLASSIFIED for unknown errors until all packages
44-
* are migrated to the new error system.
42+
* and falls back to INTERNAL_ERROR for truly unknown errors.
4543
*/
4644
export function resolveErrorCode(error: unknown, explicitCode?: CliError.Code): CliError.Code {
4745
if (explicitCode != null) {
@@ -56,7 +54,7 @@ export function resolveErrorCode(error: unknown, explicitCode?: CliError.Code):
5654
if (isNodeVersionError(error)) {
5755
return "ENVIRONMENT_ERROR";
5856
}
59-
return "UNCLASSIFIED";
57+
return "INTERNAL_ERROR";
6058
}
6159

6260
export class CliError extends Error {

0 commit comments

Comments
 (0)