From 2e3fbe57f38a501c09bcb249f92ee9d35f4b63a0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 08:53:06 +0000 Subject: [PATCH 1/2] Initial plan From 498ed41b80f8165f8aa10dd39fea0ddf672c5c6a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 26 Mar 2026 09:00:42 +0000 Subject: [PATCH 2/2] Await newIncidentDispatchAction dispatch so success notification is only shown on success and errors propagate to catch block Co-authored-by: stephenhand <1694716+stephenhand@users.noreply.github.com> Agent-Logs-Url: https://github.com/techmatters/flex-plugins/sessions/8ff858da-fa0e-4668-bc0f-ba268cb2ea83 --- .../customIntegrations/uscr/DispatchIncidentButton.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugin-hrm-form/src/components/customIntegrations/uscr/DispatchIncidentButton.tsx b/plugin-hrm-form/src/components/customIntegrations/uscr/DispatchIncidentButton.tsx index eacce63a84..20b7e19455 100644 --- a/plugin-hrm-form/src/components/customIntegrations/uscr/DispatchIncidentButton.tsx +++ b/plugin-hrm-form/src/components/customIntegrations/uscr/DispatchIncidentButton.tsx @@ -105,8 +105,7 @@ const DispatchIncidentButton: React.FC = ({ contactId }) => { const valid = await trigger(); if (valid) { await saveDraft(); - // We use a regular dispatch here because we handle the error from where it is called. - dispatch(newIncidentDispatchAction(savedContact)); + await dispatch(newIncidentDispatchAction(savedContact)); Notifications.showNotificationSingle(dispatchSuccessNotification); } } catch (err) {