Skip to content

fix(cli): Treat Events search syntax 400s as --query mistakes - #1935

Closed
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/cli-events-search-syntax-errors
Closed

sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/cli-events-search-syntax-errors

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Recognize unwrapped Events search parser 400s as user --query mistakes (CLI-10). Details below.

via bete.

--

View Session [Sentry]

The Events endpoint returns event_search.py parser failures unwrapped
("Invalid quote at ...", "Parse error at ...", '"is:" queries are not
supported ...', "timestamp: Invalid date: ..."). Only the issue-search
wrapper "Error parsing search query" was recognized, so a typo in a
user's explore/span/log/trace --query surfaced as a raw 400 and was
reported to Sentry as a CLI bug (CLI-10).

Recognize the grammar-level parser messages too, so toSearchQueryError
turns them into a query ValidationError when the user supplied --query.

Co-Authored-By: Miguel Betegon <miguel.betegon@sentry.io>
@vercel

vercel Bot commented Nov 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
sentry-local Skipped Skipped Nov 4, 2026 9:44am UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 4, 2026

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to my comment on one of your other PRs, instead of doing regex matching let's try to address this at the root with a deterministic marker.

@sentry-junior

sentry-junior Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Closing as an accidental duplicate of #1936. It's the same commit: GitHub returned a 502 when this PR was created, so it was opened a second time. Your feedback here (use a deterministic marker instead of regex matching) carries over to #1936.

@sentry-junior

sentry-junior Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Correction: I couldn't actually close this one, because my credentials don't allow closing PRs. It's still a duplicate of #1936, so please close it.

@BYK BYK closed this Nov 4, 2026

This branch was previously deployed

1 inactive deployment
Preview — 5f8bb697 Deployed Nov 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant