Skip to content

[ENG-6795] Skip Sentry capture for CLI flag validation errors - #861

Closed
tphoney wants to merge 1 commit into
mainfrom
cursor/skip-flagerror-sentry-6a19
Closed

tphoney wants to merge 1 commit into
mainfrom
cursor/skip-flagerror-sentry-6a19

Conversation

@tphoney

@tphoney tphoney commented Oct 26, 2026

Copy link
Copy Markdown
Member

Investigation (ENG-6795 / CLI-Q)

Still an issue in Sentry, but it is not firing right now. CLI-Q is unresolved. It has not occurred only once — Sentry and Honeycomb both show 2 events, both on 2026-10-16:

Time (UTC) Command
21:51:26 overmind changes submit-plan --tags bad
21:54:06 overmind terraform plan --tags nope

No further --tags validation events since then (through 2026-10-26). The commands failed in ~1.2ms on local argument validation; there was no backend/outage. This looks like someone exercising invalid input, not a customer-facing incident.

The same capture path also produced CLI-N (invalid --timeout value 'nope', 276 events, last seen 2026-08-14). That issue is older and also unresolved.

Root cause: Execute() always called sentry.CaptureException after a command error, including expected cmd.flagError validation.

Fix

  • Treat flagError as an expected exit path: print the existing usage/validation message, keep the non-zero exit, still record the span for Honeycomb, do not send it to Sentry.
  • Return invalid --tags as flagError (invalid --tags value '…', expected format 'key=value') so that path uses the same expected-exit handling instead of a logged/Sentry error.
  • overmind terraform plan now returns the parse error (non-zero exit) instead of swallowing it.

Fixes https://overmindtech.sentry.io/issues/CLI-Q
Fixes CLI-Q

Open in Web Open in Cursor 

Fixes ENG-6795

Malformed flags such as `--tags bad` already print a usage error and
exit non-zero. Treat cmd.flagError as an expected exit path so it is
not reported as a high-priority Sentry issue.

Fixes CLI-Q

Co-authored-by: TP Honey <thomas.honey@overmind.tech>
@tphoney tphoney closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants