adminforth 1.23.0-next.2 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/spa/src/utils.ts +0 -7
- package/package.json +1 -1
package/dist/spa/src/utils.ts
CHANGED
|
@@ -31,13 +31,6 @@ export async function callApi({path, method, body=undefined}: {
|
|
|
31
31
|
}
|
|
32
32
|
return await r.json();
|
|
33
33
|
} catch(e) {
|
|
34
|
-
// if it is internal error, say to user
|
|
35
|
-
if (e instanceof TypeError && e.message === 'Failed to fetch') {
|
|
36
|
-
// this is a network error
|
|
37
|
-
adminforth.alert({variant:'danger', message: window.i18n?.global?.t('Network error, please check your Internet connection and try again'),})
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
34
|
adminforth.alert({variant:'danger', message: window.i18n?.global?.t('Something went wrong, please try again later'),})
|
|
42
35
|
console.error(`error in callApi ${path}`, e);
|
|
43
36
|
}
|