Add web network failure error detection (close APP-83) (#537)

zio/stable
Paul Frazee 2023-04-25 20:46:47 -05:00 committed by GitHub
parent e99c324f14
commit e1fd50d014
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

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