From 1f882daadf0602067e303215fa6664c6316983a2 Mon Sep 17 00:00:00 2001 From: Lin Huiqing <37061143+LinHuiqing@users.noreply.github.com> Date: Wed, 4 Oct 2023 02:00:04 +0800 Subject: [PATCH] fix: missing errors in error mapper (#6764) --- .../submission/encrypt-submission/encrypt-submission.utils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/app/modules/submission/encrypt-submission/encrypt-submission.utils.ts b/src/app/modules/submission/encrypt-submission/encrypt-submission.utils.ts index 7c6bfe53a9..9ece480f6d 100644 --- a/src/app/modules/submission/encrypt-submission/encrypt-submission.utils.ts +++ b/src/app/modules/submission/encrypt-submission/encrypt-submission.utils.ts @@ -62,8 +62,10 @@ import { } from '../../spcp/spcp.errors' import { MissingUserError } from '../../user/user.errors' import { + AttachmentTooLargeError, ConflictError, InvalidEncodingError, + InvalidFileExtensionError, ProcessingError, ResponseModeError, SubmissionNotFoundError, @@ -205,6 +207,8 @@ const errorMapper: MapRouteError = ( } case ValidateFieldError: case DatabaseValidationError: + case InvalidFileExtensionError: + case AttachmentTooLargeError: case ProcessingError: return { statusCode: StatusCodes.BAD_REQUEST,