The exception thrown is HandlerMethodValidationException when @NotBlank is declared directly on method parameters such as @PathVariable. However, we were expecting MethodArgumentNotValidException, which is currently handled, to return a custom error response.
The exception thrown is
HandlerMethodValidationException
when@NotBlank
is declared directly on method parameters such as @PathVariable. However, we were expectingMethodArgumentNotValidException
, which is currently handled, to return a custom error response.