Skip to content

Commit

Permalink
Trimming the space at the end of error message
Browse files Browse the repository at this point in the history
  • Loading branch information
vikhyat187 authored Dec 26, 2023
1 parent e322ddf commit 9afdf68
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public ResponseEntity<GenericResponse<Object>> handleMethodArgumentNotValidExcep
log.error("MethodArgumentNotValidException Exception - Error : {}", ex.getMessage(), ex);
return ResponseEntity
.status(HttpStatus.BAD_REQUEST)
.body(new GenericResponse<>(null, errorString.toString()));
.body(new GenericResponse<>(null, errorString.toString().trim()));
}

@ExceptionHandler({Exception.class})
Expand Down

0 comments on commit 9afdf68

Please sign in to comment.