Skip to content

fix(issues): Show API validation error when bulk updating issues fails - #126831

Merged
cvxluo merged 4 commits into
getsentry:masterfrom
AyeshaWaseemAhmad:fix/issue-list-bulk-update-error-message
Oct 8, 2026
Merged

cvxluo merged 4 commits into
getsentry:masterfrom
AyeshaWaseemAhmad:fix/issue-list-bulk-update-error-message

Conversation

@AyeshaWaseemAhmad

Copy link
Copy Markdown
Contributor

Resolving issues from the issue list always shows the generic "Unable to update issues" toast, even when the API responds with a 400 that explains why. For example, resolving "in next release" on a project with no release data returns {"statusDetails": {"inNextRelease": ["No release data present in the system to form a basis for 'Next Release'"]}}, and the user only sees the reason by opening the browser console.

performBulkUpdate now shows the first validation message from a 400 response (Unable to update issues: <message>). Other failures keep the existing generic message. The 400 body here is a nested serializer error rather than a detail string, so getRequestErrorUserMessage would not have surfaced it.

This only covers the issue list. The issue details page goes through GroupStore.onUpdateError, which has its own generic message, and I left that alone to keep this PR focused.

Tests added in issueList/actions/index.spec.tsx: one for the validation message and one confirming the generic fallback. The validation test fails without the change.

Fixes #125011

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

Resolving issues from the issue list always showed "Unable to update issues"
even when the API returned a 400 explaining why (for example, resolving in
"Next Release" when the project has no release data). Surface the first
validation message from the response, and keep the generic message for other
failures.

Refs getsentry#125011
@AyeshaWaseemAhmad
AyeshaWaseemAhmad requested a review from a team as a code owner October 8, 2026 09:52
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 8, 2026
});
}

function findFirstErrorMessage(value: unknown): string | undefined {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

i think we have some variety of this function already elsewhere in the codebase, like getWorkflowEngineResponseErrorMessage

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks. Replaced it with getWorkflowEngineResponseErrorMessage in ce83b3a.

…ate errors

The bulk update error toast walked the response body with its own
findFirstErrorMessage. getWorkflowEngineResponseErrorMessage already extracts
the first message from a nested error response, so use it instead.
@cvxluo cvxluo added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Oct 8, 2026

@cvxluo cvxluo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm, thanks for putting this up!

@cvxluo
cvxluo merged commit cd6aff4 into getsentry:master Oct 8, 2026
82 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generic error 400 when resolving an issue

2 participants