minor fixes
This commit is contained in:
parent
72e9b1cfa2
commit
ca81f764e5
2 changed files with 11 additions and 12 deletions
|
@ -5,15 +5,14 @@ export const errorCodes = {
|
|||
};
|
||||
|
||||
export function ErrorHandler(error) {
|
||||
if (error.res)
|
||||
if (
|
||||
error.response?.status.toString() ==
|
||||
errorCodes.ERR_STORAGE_LIMIT_EXCEEDED ||
|
||||
error.response?.status.toString() ==
|
||||
errorCodes.ERR_NO_ACTIVE_SUBSCRIPTION
|
||||
) {
|
||||
throw new Error(error.response.status);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
if (
|
||||
error.response?.status.toString() ==
|
||||
errorCodes.ERR_STORAGE_LIMIT_EXCEEDED ||
|
||||
error.response?.status.toString() ==
|
||||
errorCodes.ERR_NO_ACTIVE_SUBSCRIPTION
|
||||
) {
|
||||
throw new Error(error.response.status);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import errorCodes from './errorUtil';
|
||||
import {errorCodes} from './errorUtil';
|
||||
|
||||
export function checkConnectivity() {
|
||||
if (navigator.onLine) {
|
||||
|
|
Loading…
Add table
Reference in a new issue