Explorar o código

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
Brian Gough hai 1 ano
pai
achega
9d8f9e5358
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      services/history-v1/storage/scripts/backup.mjs

+ 2 - 2
services/history-v1/storage/scripts/backup.mjs

@@ -763,7 +763,7 @@ async function compareBackups(projectId, options) {
         }
         }
       } catch (err) {
       } catch (err) {
         if (err instanceof NotFoundError) {
         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++
           totalChunksNotFound++
           errors.push({ chunkId: chunk.id, error: `Chunk not found` })
           errors.push({ chunkId: chunk.id, error: `Chunk not found` })
         } else {
         } else {
@@ -809,7 +809,7 @@ async function compareBackups(projectId, options) {
           }
           }
         } catch (err) {
         } catch (err) {
           if (err instanceof NotFoundError) {
           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++
             totalBlobsNotFound++
             errors.push({
             errors.push({
               chunkId: chunk.id,
               chunkId: chunk.id,