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

This commit is contained in:
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

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