Repository navigation
fix(issues): Return 400 for InvalidSearchQuery during bulk delete and update #128414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cvxluo
merged 6 commits into
master
from
seer/fix/issues-bulk-delete-invalid-search-query-400
Oct 21, 2026
Merged
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0f0534b
fix(issues): Return 400 for InvalidSearchQuery during bulk delete and…
sentry[bot] c5c5e2b
fix(issues): Return 400 when bulk delete or update encounters an Inva…
sentry[bot] 4bbaa7f
fix(issues): Return 400 instead of 500 on invalid search query in bul…
sentry[bot] ae04c10
fix(issues): Return 400 instead of 500 when bulk delete/update gets a…
cvxluo fab7212
Merge branch 'master' into seer/fix/issues-bulk-delete-invalid-search…
cvxluo 95fd651
Merge branch 'master' into seer/fix/issues-bulk-delete-invalid-search…
frifri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,7 @@ | |
| from sentry.apidocs.response_types import ValidationErrorResponse | ||
| from sentry.deletions.defaults.group import GROUP_CHUNK_SIZE | ||
| from sentry.deletions.tasks.groups import delete_groups_for_project | ||
| from sentry.exceptions import InvalidSearchQuery | ||
| from sentry.models.group import Group, GroupStatus | ||
| from sentry.models.groupinbox import GroupInbox | ||
| from sentry.models.project import Project | ||
|
|
@@ -185,8 +186,11 @@ | |
| "paginator_options": {"max_limit": BULK_MUTATION_LIMIT}, | ||
| } | ||
| ) | ||
| except ValidationError as exc: | ||
| except (ValidationError, InvalidSearchQuery) as exc: | ||
| # InvalidSearchQuery can be raised while building the Snuba query | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sentry get rid of this comment |
||
| # (e.g. `issue:` with a value that isn't a valid short ID), after | ||
| # parsing has already succeeded. It's a client error, not a 500. | ||
| return Response({"detail": str(exc)}, status=400) | ||
Check warningCode scanning / CodeQL Information exposure through an exception Medium Stack trace information Error loading related location Loading |
||
|
|
||
| group_list = list(cursor_result) | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.