remove unneeded custom errror
This commit is contained in:
parent
ebd4d18689
commit
f5d8d21539
|
@ -5,7 +5,6 @@ import { getEndpoint } from 'utils/common/apiUtil';
|
|||
import { logError } from 'utils/sentry';
|
||||
import ComlinkCryptoWorker from 'utils/comlink/ComlinkCryptoWorker';
|
||||
import { getActualKey } from 'utils/common/key';
|
||||
import { CustomError } from 'utils/error';
|
||||
import {
|
||||
EntityType,
|
||||
Entity,
|
||||
|
@ -66,9 +65,6 @@ const getEntityKey = async (type: EntityType) => {
|
|||
);
|
||||
return { data: decryptedData, ...rest } as EntityKey;
|
||||
} catch (e) {
|
||||
if (e.status === 404) {
|
||||
throw Error(CustomError.LOCATION_TAG_ENTITY_NOT_FOUND);
|
||||
}
|
||||
logError(e, 'Get entity key failed');
|
||||
throw e;
|
||||
}
|
||||
|
@ -142,9 +138,7 @@ const syncEntity = async <T>(type: EntityType) => {
|
|||
await localForage.setItem(ENTITY_SYNC_TIME_TABLES[type], syncTime);
|
||||
} while (response.hasMore);
|
||||
} catch (e) {
|
||||
if (e.message !== CustomError.LOCATION_TAG_ENTITY_NOT_FOUND) {
|
||||
logError(e, 'Sync entity failed');
|
||||
}
|
||||
logError(e, 'Sync entity failed');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -66,7 +66,6 @@ export const CustomError = {
|
|||
EXIF_DATA_NOT_FOUND: 'exif data not found',
|
||||
SELECT_FOLDER_ABORTED: 'select folder aborted',
|
||||
NON_MEDIA_FILE: 'non media file',
|
||||
LOCATION_TAG_ENTITY_NOT_FOUND: 'location tag entity not found',
|
||||
};
|
||||
|
||||
export function parseUploadErrorCodes(error) {
|
||||
|
|
Loading…
Reference in a new issue