{"record":{"id":"bee2fd023f489f4f","repo":"overleaf/overleaf","slug":"some-files-could-not-be-processed-see-logs-in-o","errorCode":null,"errorMessage":"Some files could not be processed, see logs in ${OUTPUT_FILE} and try again","messagePattern":"Some files could not be processed, see logs in (.+?) and try again","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"services/history-v1/storage/scripts/back_fill_file_hash.mjs","lineNumber":1479,"sourceCode":"\nif (DISPLAY_REPORT) {\n  await cleanupBufferDir()\n  console.warn('Displaying report...')\n  await displayReport()\n  process.exit(0)\n}\n\ntry {\n  try {\n    await main()\n  } finally {\n    printStats(true)\n    await cleanupBufferDir()\n  }\n\n  let code = 0\n  if (STATS.filesFailed > 0) {\n    console.warn(\n      `Some files could not be processed, see logs in ${OUTPUT_FILE} and try again`\n    )\n    code++\n  }\n  if (STATS.fileHardDeleted > 0) {\n    console.warn(\n      'Some hashes could not be updated as the files were hard-deleted, this should not happen'\n    )\n    code++\n  }\n  if (STATS.projectHardDeleted > 0) {\n    console.warn(\n      'Some hashes could not be updated as the project was hard-deleted, this should not happen'\n    )\n    code++\n  }\n  console.warn('-'.repeat(79))\n  if (code === 0) {","sourceCodeStart":1461,"sourceCodeEnd":1497,"githubUrl":"https://github.com/overleaf/overleaf/blob/28ad3b03b71cb4311decdcb55c36b33ec10d72db/services/history-v1/storage/scripts/back_fill_file_hash.mjs#L1461-L1497","documentation":"Exit-time summary in the back-fill script: STATS.filesFailed > 0, meaning at least one file could not be hashed/migrated during the run. The script bumps its exit code so automation can detect the incomplete pass and points the operator at the detailed failure log in OUTPUT_FILE.","triggerScenarios":"Thrown at services/history-v1/storage/scripts/back_fill_file_hash.mjs:1479 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Review OUTPUT_FILE for the per-file failure reasons","Fix the underlying causes (unreadable files, transient store errors) and re-run; the script is resumable","Monitor the exit code in automation so failed back-fills are not silently dropped"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"28ad3b03b71cb4311decdcb55c36b33ec10d72db","analyzedAt":"2026-09-03T02:10:22.807Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}