Skip to content

Commit de49afc

Browse files
committed
chore(cli): re-enable Sentry reporting for unclassified errors (fallback to InternalError)
Made-with: Cursor
1 parent 813f087 commit de49afc

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

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

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ export namespace CliError {
5757
ValidationError: "VALIDATION_ERROR",
5858
NetworkError: "NETWORK_ERROR",
5959
AuthError: "AUTH_ERROR",
60-
ConfigError: "CONFIG_ERROR",
61-
Unclassified: "UNCLASSIFIED"
60+
ConfigError: "CONFIG_ERROR"
6261
} as const;
6362
}
6463

@@ -74,8 +73,7 @@ const SENTRY_REPORTABLE: Record<CliError.Code, boolean> = {
7473
VALIDATION_ERROR: false,
7574
NETWORK_ERROR: false,
7675
AUTH_ERROR: false,
77-
CONFIG_ERROR: false,
78-
UNCLASSIFIED: false
76+
CONFIG_ERROR: false
7977
};
8078

8179
export function shouldReportToSentry(code: CliError.Code): boolean {
@@ -95,8 +93,7 @@ function isNodeVersionError(error: unknown): boolean {
9593
/**
9694
* Resolves the effective error code: explicit override wins,
9795
* then auto-detects from known error types,
98-
* and falls back to UNCLASSIFIED for unknown errors until all packages
99-
* are migrated to the new error system.
96+
* and falls back to INTERNAL_ERROR for truly unknown errors.
10097
*/
10198
export function resolveErrorCode(error: unknown, explicitCode?: CliError.Code): CliError.Code {
10299
if (explicitCode != null) {
@@ -111,5 +108,5 @@ export function resolveErrorCode(error: unknown, explicitCode?: CliError.Code):
111108
if (isNodeVersionError(error)) {
112109
return CliError.Code.EnvironmentError;
113110
}
114-
return CliError.Code.Unclassified;
111+
return CliError.Code.InternalError;
115112
}

0 commit comments

Comments
 (0)