misc: added outer try catch block

This commit is contained in:
Sheen Capadngan
2024-06-03 17:58:39 +08:00
parent cd6caab508
commit 4d830f1d1a
@@ -331,6 +331,7 @@ export const snapshotDALFactory = (db: TDbClient) => {
const PRUNE_FOLDER_BATCH_SIZE = 10000; const PRUNE_FOLDER_BATCH_SIZE = 10000;
let uuidOffset = "00000000-0000-0000-0000-000000000000"; let uuidOffset = "00000000-0000-0000-0000-000000000000";
try {
// eslint-disable-next-line no-constant-condition, no-unreachable-loop // eslint-disable-next-line no-constant-condition, no-unreachable-loop
while (true) { while (true) {
const folderBatch = await db(TableName.SecretFolder) const folderBatch = await db(TableName.SecretFolder)
@@ -375,6 +376,9 @@ export const snapshotDALFactory = (db: TDbClient) => {
return; return;
} }
} }
} catch (error) {
throw new DatabaseError({ error, name: "SnapshotPrune" });
}
}; };
return { return {