chore(cli): re-enable Sentry reporting for unclassified errors#14752
Conversation
🌱 Seed Test SelectorSelect languages to run seed tests for:
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. |
There was a problem hiding this comment.
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.
fd89650 to
6e6d684
Compare
6172072 to
ea44cc1
Compare
ab973cc to
fd585dd
Compare
ea44cc1 to
a1d4044
Compare
| return "ENVIRONMENT_ERROR"; | ||
| } | ||
| return "UNCLASSIFIED"; | ||
| return "INTERNAL_ERROR"; |
fd585dd to
630e15e
Compare
a1d4044 to
4221daf
Compare
| this.code = code; | ||
| this.docsLink = docsLink; | ||
| } | ||
| export const CliError.Code = { |
There was a problem hiding this comment.
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];
}| export const CliError.Code = { | |
| export namespace CliError { | |
| export const Code = { |
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
4221daf to
9ddd177
Compare
68c2b60 to
0549359
Compare
9ddd177 to
de49afc
Compare
0549359 to
813f087
Compare
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
813f087 to
21e744b
Compare
de49afc to
0bd6ba6
Compare
21e744b to
b9b9c99
Compare
0bd6ba6 to
a6379df
Compare
a6379df to
d2a8aa2
Compare
b9b9c99 to
a67cf84
Compare
d2a8aa2 to
3c229d7
Compare
0b71fc4 to
dc33e43
Compare
3c229d7 to
0ffbee0
Compare
dc33e43 to
7a7c757
Compare
0ffbee0 to
6933edf
Compare
7a7c757 to
f473624
Compare
6933edf to
a5478b0
Compare
f473624 to
41d0da0
Compare
…ack to InternalError) Made-with: Cursor
a5478b0 to
6a1d5d5
Compare

Description
Removes the temporary
UNCLASSIFIEDerror code and reverts catch-all handlers back toINTERNAL_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
UNCLASSIFIEDfromCliError.CodeUNCLASSIFIED→INTERNAL_ERRORin:cli.ts(CLI v1 top-level catch)CliContext.ts(CLI v1 task runner)withContext.ts→reportError(CLI v2)Testing