fix: Show meaning full error message while creating and email inbox [CW-1312] (#6711)

* chore: Shows error message while creating and email inbox

* chore: Review fixes

---------

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
This commit is contained in:
Sivin Varghese
2023-03-27 16:15:11 +05:30
committed by GitHub
parent 7de89b6f9b
commit b3850cb4fa
2 changed files with 8 additions and 4 deletions

View File

@@ -157,8 +157,9 @@ export const actions = {
sendAnalyticsEvent(channel.type);
return response.data;
} catch (error) {
const errorMessage = error?.response?.data?.message;
commit(types.default.SET_INBOXES_UI_FLAG, { isCreating: false });
throw new Error(error);
throw new Error(errorMessage);
}
},
createWebsiteChannel: async ({ commit }, params) => {