From b5ea92ea23bff1699525e4cd4f6ac913480f4803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Guti=C3=A9rrez?= <34506328+sg-gs@users.noreply.github.com> Date: Mon, 16 Mar 2026 18:13:59 +0100 Subject: [PATCH] Change error handling in finishUpload method Throw error instead of returning for size mismatch. --- lib/core/buckets/usecase.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/buckets/usecase.ts b/lib/core/buckets/usecase.ts index 6965b32c..f69c0b88 100644 --- a/lib/core/buckets/usecase.ts +++ b/lib/core/buckets/usecase.ts @@ -682,7 +682,7 @@ export class BucketsUsecase { await this.validateObjectInStorage(contact, uuid, data_size).catch((error) => { if (error instanceof UploadSizeDoesNotMatchError) { log.error(`[finishUpload][SizeDoesNotMatchError] ${JSON.stringify({ uuid, expectedSize: data_size, contactId: contact.id, message: error.message, isMultipartUpload })}`); - return; + throw error; } if (error instanceof UploadNotFoundInStorageError) {