Merge pull request #23835 from overleaf/bg-backup-show-errors

add error cause logging for missing chunks and blobs in backup comparison

GitOrigin-RevId: 9a1bf84b64621add71fb1d1e0cb013598b226bc8
This commit is contained in:
Brian Gough
2025-02-24 14:51:20 +00:00
committed by Copybot
parent 7f2f7a769d
commit 01c7a42787

View File

@@ -763,7 +763,7 @@ async function compareBackups(projectId, options) {
}
} catch (err) {
if (err instanceof NotFoundError) {
console.log(`✗ Chunk ${chunk.id} not found in backup`)
console.log(`✗ Chunk ${chunk.id} not found in backup`, err.cause)
totalChunksNotFound++
errors.push({ chunkId: chunk.id, error: `Chunk not found` })
} else {
@@ -809,7 +809,7 @@ async function compareBackups(projectId, options) {
}
} catch (err) {
if (err instanceof NotFoundError) {
console.log(` ✗ Blob ${blob.hash} not found in backup`)
console.log(` ✗ Blob ${blob.hash} not found in backup`, err.cause)
totalBlobsNotFound++
errors.push({
chunkId: chunk.id,