Skip to content

Commit

Permalink
fix: update response limit error message for storage mode submissions (
Browse files Browse the repository at this point in the history
…#2448)

* fix: update response limit error message for storage mode submissions

* fix: remove ||
  • Loading branch information
jia1 authored Aug 11, 2021
1 parent 7e1847f commit 920f7d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ const submitEncryptModeForm: ControllerHandler<
meta: logMeta,
error: formPublicResult.error,
})
const { statusCode } = mapRouteError(formPublicResult.error)
const { statusCode, errorMessage } = mapRouteError(formPublicResult.error)
if (statusCode === StatusCodes.GONE) {
return res.sendStatus(statusCode)
} else {
return res.status(statusCode).json({
message: form.inactiveMessage,
message: errorMessage,
})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ const errorMapper: MapRouteError = (
case PrivateFormError:
return {
statusCode: StatusCodes.NOT_FOUND,
errorMessage: error.message,
errorMessage:
'This form has been taken down. For assistance, please contact the person who asked you to fill in this form.',
}
case CaptchaConnectionError:
return {
Expand Down

0 comments on commit 920f7d1

Please sign in to comment.