Files
formbricks/apps
Andres Cruciani 7d7533b71c fix: check serverError before showing success toast
Server actions return HTTP 200 with serverError field on failure.
Frontend was only checking HTTP status, not the response body,
causing success toasts to show when operations actually failed.

Fixed handlers:
- handleDeleteSurvey (survey-dropdown-menu.tsx)
- handleLeaveOrganization (organization-actions.tsx)
- handleDeleteMember (member-actions.tsx)
- handleDeleteTeam (delete-team.tsx)
- handleDeleteSegment (segment-settings.tsx)
- performLanguageDeletion, handleSaveChanges (edit-language.tsx)
- onSubmit, handleDeleteAction (ActionSettingsTab.tsx)
- handleSaveSegment (targeting-card.tsx)

Each now checks result?.serverError before showing success toast.

Fixes #3302
2026-01-31 10:23:58 -05:00
..