fix: Show toast on inbox assignment error

This commit is contained in:
Fayaz Ahmed
2024-06-11 07:07:15 +05:30
parent 20b2dc8c6f
commit 610cb5219b
@@ -1,5 +1,5 @@
import Vue from 'vue';
import { emitter } from 'shared/helpers/mitt';
import AssignableAgentsAPI from '../../api/assignableAgents';
const state = {
@@ -37,6 +37,10 @@ export const actions = {
members: payload,
});
} catch (error) {
emitter.emit(
'newToastMessage',
'Network Error: Unable to fetch assignable agents.'
);
throw new Error(error);
} finally {
commit(types.SET_INBOX_ASSIGNABLE_AGENTS_UI_FLAG, { isFetching: false });