Skip to content

fix: check serverError before showing success toast#1

Open
wndzph9jkb-create wants to merge 1 commit into
mainfrom
fix/server-error-toast
Open

fix: check serverError before showing success toast#1
wndzph9jkb-create wants to merge 1 commit into
mainfrom
fix/server-error-toast

Conversation

@wndzph9jkb-create
Copy link
Copy Markdown
Owner

- Add handleActionResult utility for centralized serverError checking
- Fix edit-workspace-name-form to check serverError before success toast
- Prevents false success toasts when server returns serverError with status 200

The bug: next-safe-action returns { serverError: '...' } as success data
because the HTTP status is 200. Components check for .data existence and
show success toasts without checking for serverError.

Closes formbricks#3302
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.

[BUG] Internal Server Errors still shows success toast

1 participant