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 6cdc42cf7a..4c5b7eaec2 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 +}