From a211f3fd49ce83bc017d76655f5f5c7c13f7071c Mon Sep 17 00:00:00 2001 From: jasquat Date: Thu, 28 Sep 2023 14:57:31 -0400 Subject: [PATCH] ignore was aborted errors on the interstitial page since they do not matter w/ burnettk --- .../src/components/ProcessInterstitial.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spiffworkflow-frontend/src/components/ProcessInterstitial.tsx b/spiffworkflow-frontend/src/components/ProcessInterstitial.tsx index f3efa39be..b1350d964 100644 --- a/spiffworkflow-frontend/src/components/ProcessInterstitial.tsx +++ b/spiffworkflow-frontend/src/components/ProcessInterstitial.tsx @@ -57,8 +57,13 @@ export default function ProcessInterstitial({ onerror(error: any) { // if backend returns a 500 then stop attempting to load the task setState('CLOSED'); - addError(error); - throw error; + // we know that this server sent events lib gets these sorts of errors when you are on another tab or window while it is working. + // it's fine + const wasAbortedError = /was aborted/.test(error.message); + if (!wasAbortedError) { + addError(error); + throw error; + } }, onclose() { setState('CLOSED');