fix: Remove empty catch blocks and add error logging

This commit is contained in:
ZacharyZcR
2025-11-09 04:03:18 +08:00
parent c69d31062e
commit d7bbad89c3
21 changed files with 213 additions and 52 deletions

View File

@@ -1480,13 +1480,17 @@ app.get(
if (status.hasUnencryptedDb) {
try {
unencryptedSize = fs.statSync(dbPath).size;
} catch {}
} catch (error) {
databaseLogger.debug("Operation failed, continuing", { error });
}
}
if (status.hasEncryptedDb) {
try {
encryptedSize = fs.statSync(encryptedDbPath).size;
} catch {}
} catch (error) {
databaseLogger.debug("Operation failed, continuing", { error });
}
}
res.json({