fix: Show error messages from response (#10173)

This PR fixes the issue where proper error messages from the backend
were not displayed when an email already exists in the system during a
profile update, or when a phone number is already taken for Twilio
during the creation of a new account.

Fixes:
https://linear.app/chatwoot/issue/CW-3560/prod-customer-facing-issue-updating-email
This commit is contained in:
Sivin Varghese
2024-09-27 08:46:39 +05:30
committed by GitHub
parent 4a7a0427e9
commit f4f2d678cf
3 changed files with 8 additions and 5 deletions

View File

@@ -183,7 +183,7 @@ export const actions = {
return response.data;
} catch (error) {
commit(types.default.SET_INBOXES_UI_FLAG, { isCreating: false });
throw new Error(error);
throw error;
}
},
createFBChannel: async ({ commit }, params) => {