Skip to content

fix(settings): Surface slug validation errors on org settings form#112556

Merged
cvxluo merged 1 commit intomasterfrom
cvxluo/surface-slug-validation-errors-on-org-settings-for
Apr 9, 2026
Merged

fix(settings): Surface slug validation errors on org settings form#112556
cvxluo merged 1 commit intomasterfrom
cvxluo/surface-slug-validation-errors-on-org-settings-for

Conversation

@cvxluo
Copy link
Copy Markdown
Contributor

@cvxluo cvxluo commented Apr 8, 2026

When changing the org slug to one already in use, the backend returns a field-level error but the frontend was showing a generic 'Unable to save change' toast. This was a regression from the form migration to TanStack which landed after the backend fix.

Use setFieldErrors to display the API validation message inline on the slug field instead of swallowing it.
Screenshot 2026-04-08 at 6 00 26 PM

I kept the toast showing up so this diff remains small.

Fixes #112376

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 8, 2026
@cvxluo cvxluo force-pushed the cvxluo/surface-slug-validation-errors-on-org-settings-for branch from 85fff20 to eca6f40 Compare April 8, 2026 23:48
@cvxluo cvxluo force-pushed the cvxluo/surface-slug-validation-errors-on-org-settings-for branch from eca6f40 to 853b44e Compare April 9, 2026 00:49
@cvxluo cvxluo force-pushed the cvxluo/surface-slug-validation-errors-on-org-settings-for branch from 853b44e to b59ed09 Compare April 9, 2026 00:55
When changing the org slug to one already in use, the backend returns
a field-level error but the frontend was showing a generic 'Unable to
save change' toast. This was a regression from the form migration to
TanStack which landed after the backend fix.

Use setFieldErrors to display the API validation message inline on the
slug field instead of swallowing it.

Co-authored-by: Claude <noreply@anthropic.com>
@cvxluo cvxluo force-pushed the cvxluo/surface-slug-validation-errors-on-org-settings-for branch from b59ed09 to 2273d66 Compare April 9, 2026 00:59
@cvxluo cvxluo marked this pull request as ready for review April 9, 2026 15:33
@cvxluo cvxluo requested a review from a team as a code owner April 9, 2026 15:33
@cvxluo cvxluo requested a review from a team April 9, 2026 15:33
Copy link
Copy Markdown
Collaborator

@TkDodo TkDodo left a comment

Choose a reason for hiding this comment

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

perfect, thank you 🙏

@cvxluo cvxluo merged commit 4671b7b into master Apr 9, 2026
67 checks passed
@cvxluo cvxluo deleted the cvxluo/surface-slug-validation-errors-on-org-settings-for branch April 9, 2026 15:52
george-sentry pushed a commit that referenced this pull request Apr 9, 2026
…112556)

When changing the org slug to one already in use, the backend returns a
field-level error but the frontend was showing a generic 'Unable to save
change' toast. This was a regression from the form migration to TanStack
which landed after the backend fix.

Use setFieldErrors to display the API validation message inline on the
slug field instead of swallowing it.
<img width="1196" height="260" alt="Screenshot 2026-04-08 at 6 00 26 PM"
src="https://github.com/user-attachments/assets/77af01f0-f9b9-4fca-ab64-5754be786036"
/>

I kept the toast showing up so this diff remains small.

Fixes #112376

Co-authored-by: Claude <noreply@anthropic.com>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Org slug change shows generic error instead of specific “slug already in use” message

2 participants