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) {