diff --git a/client/src/action/county/uploadBallotManifest.ts b/client/src/action/county/uploadBallotManifest.ts index 8e70b4bbd..c114db6a7 100644 --- a/client/src/action/county/uploadBallotManifest.ts +++ b/client/src/action/county/uploadBallotManifest.ts @@ -38,11 +38,7 @@ async function importBallotManifest(body: any) { action('IMPORT_BALLOT_MANIFEST_OK', data); } catch (e) { - if (e.message === 'Failed to fetch') { - action('IMPORT_BALLOT_MANIFEST_NETWORK_FAIL'); - } - - action('INTERNAL_ERROR'); + action('IMPORT_BALLOT_MANIFEST_NETWORK_FAIL'); throw e; } @@ -75,11 +71,7 @@ async function uploadBallotManifest(countyId: number, file: Blob, hash: string) importBallotManifest(received); } catch (e) { - if (e.message === 'Failed to fetch') { - action('UPLOAD_BALLOT_MANIFEST_NETWORK_FAIL'); - } - - action('INTERNAL_ERROR'); + action('UPLOAD_BALLOT_MANIFEST_NETWORK_FAIL'); throw e; } diff --git a/client/src/action/county/uploadCvrExport.ts b/client/src/action/county/uploadCvrExport.ts index 7409da1c2..823f642ce 100644 --- a/client/src/action/county/uploadCvrExport.ts +++ b/client/src/action/county/uploadCvrExport.ts @@ -38,11 +38,7 @@ async function importCvrExport(body: any) { action('IMPORT_CVR_EXPORT_OK', data); } catch (e) { - if (e.message === 'Failed to fetch') { - action('IMPORT_CVR_EXPORT_NETWORK_FAIL'); - } - - action('INTERNAL_ERROR'); + action('IMPORT_CVR_EXPORT_NETWORK_FAIL'); throw e; } @@ -75,11 +71,7 @@ async function uploadCvrExport(countyId: number, file: Blob, hash: string) { importCvrExport(received); } catch (e) { - if (e.message === 'Failed to fetch') { - action('UPLOAD_CVR_EXPORT_NETWORK_FAIL'); - } - - action('INTERNAL_ERROR'); + action('UPLOAD_CVR_EXPORT_NETWORK_FAIL'); throw e; } diff --git a/client/src/action/createFetchAction.ts b/client/src/action/createFetchAction.ts index f3d6a4d1e..01e839913 100644 --- a/client/src/action/createFetchAction.ts +++ b/client/src/action/createFetchAction.ts @@ -42,11 +42,7 @@ function createFetchAction(config: CreateFetchConfig) { action(okType, data); } catch (e) { - if (e.message === 'Failed to fetch') { - action(networkFailType); - } - - action('INTERNAL_ERROR'); + action(networkFailType); throw e; } diff --git a/client/src/action/createSubmitAction.ts b/client/src/action/createSubmitAction.ts index f8fe91305..2350f08f5 100644 --- a/client/src/action/createSubmitAction.ts +++ b/client/src/action/createSubmitAction.ts @@ -55,11 +55,7 @@ function createSubmitAction(config: CreateSubmitConfig) { action(okType, data); } catch (e) { - if (e.message === 'Failed to fetch') { - action(networkFailType); - } - - action('INTERNAL_ERROR'); + action(networkFailType); throw e; }