diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-04-25 20:46:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-25 20:46:47 -0500 |
commit | e1fd50d014749fc7757a322839ea46b4156ba8c4 (patch) | |
tree | 10d79f194b03c0a1e0a9ab3ce86ac896218761b5 /src/lib/strings/errors.ts | |
parent | e99c324f14f44ab00427648d74c8332d34c1dc1c (diff) | |
download | voidsky-e1fd50d014749fc7757a322839ea46b4156ba8c4.tar.zst |
Add web network failure error detection (close APP-83) (#537)
Diffstat (limited to 'src/lib/strings/errors.ts')
-rw-r--r-- | src/lib/strings/errors.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/strings/errors.ts b/src/lib/strings/errors.ts index 0efcad335..0c11a6706 100644 --- a/src/lib/strings/errors.ts +++ b/src/lib/strings/errors.ts @@ -19,5 +19,9 @@ export function cleanError(str: any): string { export function isNetworkError(e: unknown) { const str = String(e) - return str.includes('Abort') || str.includes('Network request failed') + return ( + str.includes('Abort') || + str.includes('Network request failed') || + str.includes('Failed to fetch') + ) } |