Add web network failure error detection (close APP-83) (#537)
This commit is contained in:
parent
e99c324f14
commit
e1fd50d014
1 changed files with 5 additions and 1 deletions
|
@ -19,5 +19,9 @@ export function cleanError(str: any): string {
|
||||||
|
|
||||||
export function isNetworkError(e: unknown) {
|
export function isNetworkError(e: unknown) {
|
||||||
const str = String(e)
|
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')
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue