minor fixes

This commit is contained in:
Abhinav-grd 2021-02-22 16:54:34 +05:30
parent 72e9b1cfa2
commit ca81f764e5
2 changed files with 11 additions and 12 deletions

View file

@ -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;
}
}

View file

@ -1,4 +1,4 @@
import errorCodes from './errorUtil';
import {errorCodes} from './errorUtil';
export function checkConnectivity() {
if (navigator.onLine) {