diff --git a/frontend/src/hooks/api/workspace/queries.tsx b/frontend/src/hooks/api/workspace/queries.tsx index f4ea9fc1e..c869bd66f 100644 --- a/frontend/src/hooks/api/workspace/queries.tsx +++ b/frontend/src/hooks/api/workspace/queries.tsx @@ -896,9 +896,17 @@ export const useGetWorkspaceWorkflowIntegrationConfig = ({ return useQuery({ queryKey: workspaceKeys.getWorkspaceWorkflowIntegrationConfig(workspaceId, integration), queryFn: async () => { - const { data } = await apiRequest.get( - `/api/v1/workspace/${workspaceId}/workflow-integration-config/${integration}` - ); + const { data } = await apiRequest + .get( + `/api/v1/workspace/${workspaceId}/workflow-integration-config/${integration}` + ) + .catch((err) => { + if (err.response.status === 404) { + return { data: null }; + } + + throw err; + }); return data; }, diff --git a/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/MicrosoftTeamsConfigRow.tsx b/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/MicrosoftTeamsConfigRow.tsx index ad846d2b8..ef7617d52 100644 --- a/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/MicrosoftTeamsConfigRow.tsx +++ b/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/MicrosoftTeamsConfigRow.tsx @@ -24,7 +24,7 @@ import { import { UsePopUpState } from "@app/hooks/usePopUp"; type Props = { - microsoftTeamsConfig?: ProjectWorkflowIntegrationConfig; + microsoftTeamsConfig?: ProjectWorkflowIntegrationConfig | null; isMicrosoftTeamsConfigLoading: boolean; handlePopUpOpen: ( popUpName: keyof UsePopUpState<["removeIntegration", "editIntegration"]>, diff --git a/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/SlackConfigRow.tsx b/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/SlackConfigRow.tsx index 0993ef6ac..df7211f99 100644 --- a/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/SlackConfigRow.tsx +++ b/frontend/src/pages/secret-manager/SettingsPage/components/WorkflowIntegrationSection/components/SlackConfigRow.tsx @@ -24,7 +24,7 @@ import { import { UsePopUpState } from "@app/hooks/usePopUp"; type Props = { - slackConfig?: ProjectWorkflowIntegrationConfig; + slackConfig?: ProjectWorkflowIntegrationConfig | null; isSlackConfigLoading: boolean; handlePopUpOpen: ( popUpName: keyof UsePopUpState<["removeIntegration", "editIntegration"]>,