Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion packages/cli/src/lib/error-reporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ type SilenceReason =
| "output_error"
| "auth_expected"
| "api_user_error"
| "network_error";
| "network_error"
| "process_exit";

/**
* Classify whether an error should be silenced.
Expand Down Expand Up @@ -94,6 +95,16 @@ export function classifySilenced(error: unknown): SilenceReason | null {
if (error instanceof ApiError && error.status > 400 && error.status < 500) {
return "api_user_error";
}
// A child process launched by `sentry local run` or `sentry monitor run`
// that exits with a non-zero code throws `CliError("Process exited with
// code N")`. These are expected user-script failures, not CLI bugs — no
// actionable signal comes from capturing them (CLI-20G).
if (
error instanceof CliError &&
error.message.startsWith("Process exited with code")
) {
return "process_exit";
}
// A 400 (Bad Request) signals a malformed request the CLI built — a code
// defect — so it is always captured. A user's unparseable `--query` is NOT a
// 400 here: it is converted to a ValidationError at the command boundary
Expand Down
Loading