diff --git a/src/components/floweditor/FlowEditor.tsx b/src/components/floweditor/FlowEditor.tsx index ee2de3d8c..3d71a4b7a 100644 --- a/src/components/floweditor/FlowEditor.tsx +++ b/src/components/floweditor/FlowEditor.tsx @@ -11,7 +11,7 @@ import { Button } from 'components/UI/Form/Button/Button'; import { APP_NAME } from 'config/index'; import { Simulator } from 'components/simulator/Simulator'; import { DialogBox } from 'components/UI/DialogBox/DialogBox'; -import { setNotification } from 'common/notification'; +import { setErrorMessage, setNotification } from 'common/notification'; import { PUBLISH_FLOW, RESET_FLOW_COUNT } from 'graphql/mutations/Flow'; import { EXPORT_FLOW, GET_FLOW_DETAILS, GET_FREE_FLOW } from 'graphql/queries/Flow'; import { getOrganizationServices, setAuthHeaders } from 'services/AuthService'; @@ -94,6 +94,9 @@ export const FlowEditor = () => { const { exportData } = exportFlow; exportFlowMethod(exportData, flowTitle); }, + onError: (error) => { + setErrorMessage(error); + }, }); const [resetFlowCountMethod] = useMutation(RESET_FLOW_COUNT, { onCompleted: ({ resetFlowCount }) => { diff --git a/src/containers/Flow/FlowList/FlowList.tsx b/src/containers/Flow/FlowList/FlowList.tsx index 509d74fc4..3c5a2b5eb 100644 --- a/src/containers/Flow/FlowList/FlowList.tsx +++ b/src/containers/Flow/FlowList/FlowList.tsx @@ -22,7 +22,7 @@ import { GET_TAGS } from 'graphql/queries/Tags'; import { AutoComplete } from 'components/UI/Form/AutoComplete/AutoComplete'; import { flowInfo } from 'common/HelpData'; import { DialogBox } from 'components/UI/DialogBox/DialogBox'; -import { setNotification } from 'common/notification'; +import { setErrorMessage, setNotification } from 'common/notification'; const getName = (text: string, keywordsList: any, roles: any) => { const keywords = keywordsList.map((keyword: any) => keyword); @@ -114,7 +114,7 @@ export const FlowList = () => { setNotification('Flow exported successfully'); }, onError: (error: any) => { - setNotification('An error occured while exporting the flow', 'warning'); + setErrorMessage(error); }, });