From dc5cf37c71b0f68e424c0c75f3ef5391f71b4a16 Mon Sep 17 00:00:00 2001 From: kameshsr <47484458+kameshsr@users.noreply.github.com> Date: Mon, 19 May 2025 11:07:46 +0530 Subject: [PATCH] MOSIP-41050 corrected error message Signed-off-by: kameshsr <47484458+kameshsr@users.noreply.github.com> --- .../java/io/mosip/resident/exception/ApiExceptionHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resident/resident-service/src/main/java/io/mosip/resident/exception/ApiExceptionHandler.java b/resident/resident-service/src/main/java/io/mosip/resident/exception/ApiExceptionHandler.java index 6cdc42cf7a8..4c5b7eaec29 100644 --- a/resident/resident-service/src/main/java/io/mosip/resident/exception/ApiExceptionHandler.java +++ b/resident/resident-service/src/main/java/io/mosip/resident/exception/ApiExceptionHandler.java @@ -265,7 +265,7 @@ public ResponseEntity> controlRequestException(Htt public ResponseEntity> onHttpMessageNotReadable( final HttpServletRequest httpServletRequest, final HttpMessageNotReadableException e) throws IOException { ResponseWrapper errorResponse = setErrors(httpServletRequest); - ServiceError error = new ServiceError(ResidentErrorCode.BAD_REQUEST.getErrorCode(), e.getMessage()); + ServiceError error = new ServiceError(ResidentErrorCode.BAD_REQUEST.getErrorCode(), ResidentErrorCode.BAD_REQUEST.getErrorMessage()); errorResponse.getErrors().add(error); return new ResponseEntity<>(errorResponse, HttpStatus.OK); } @@ -408,4 +408,4 @@ private String setId(String requestURI) { return null; } -} \ No newline at end of file +}