RED-5293: Changed error message for empty parameters to show client which parameter is broken
This commit is contained in:
parent
5924d12059
commit
034fdd0f65
@ -100,7 +100,7 @@ public class ControllerAdvice {
|
||||
@ExceptionHandler(value = MethodArgumentNotValidException.class)
|
||||
public ErrorMessage handleMethodArgumentNotValidException(MethodArgumentNotValidException e) {
|
||||
|
||||
return new ErrorMessage(OffsetDateTime.now(), String.format("You have empty/wrong formatted parameters: %s", e.getParameter()));
|
||||
return new ErrorMessage(OffsetDateTime.now(), String.format("You have empty/wrong formatted parameters: %s", e.getParameter().getParameterName()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user