Merge pull request #22107 from overleaf/jpa-error-handling

[history-v1] back_fill_file_hash: error handling

GitOrigin-RevId: 2dbf52d015206cf42ca434b1f16221d6e0f2cc2b
This commit is contained in:
Jakob Ackermann
2024-11-25 13:07:06 +01:00
committed by Copybot
parent 0e12f9226f
commit ed27af11f8
2 changed files with 8 additions and 2 deletions

View File

@@ -140,6 +140,10 @@ async function verifyMd5(persistor, bucket, key, sourceMd5, destMd5 = null) {
}
function wrapError(error, message, params, ErrorType) {
params = {
...params,
cause: error,
}
if (
error instanceof NotFoundError ||
['NoSuchKey', 'NotFound', 404, 'AccessDenied', 'ENOENT'].includes(