From e7d9629762f11a0c786b121ab9c95dd463812a7e Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Tue, 11 Jun 2024 13:41:17 +0530 Subject: [PATCH 1/2] added error message --- src/containers/Flow/FlowList/FlowList.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }, }); From 5f9da25375bd7c257eeeb4f7634f0c07f5485017 Mon Sep 17 00:00:00 2001 From: akanshaaaa19 Date: Tue, 11 Jun 2024 16:34:29 +0530 Subject: [PATCH 2/2] added error message --- src/components/floweditor/FlowEditor.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 }) => {