ignore was aborted errors on the interstitial page since they do not matter w/ burnettk

This commit is contained in:
jasquat 2023-09-28 14:57:31 -04:00
parent 5db3ae6b16
commit a211f3fd49
1 changed files with 7 additions and 2 deletions

View File

@ -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');