We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 30d89e7 + 597f6a1 commit f24c571Copy full SHA for f24c571
src/main/java/tn/cita/app/exception/ApiExceptionHandler.java
@@ -2,6 +2,8 @@
2
3
import java.util.Optional;
4
5
+import javax.validation.ConstraintViolationException;
6
+
7
import org.springframework.http.HttpStatus;
8
import org.springframework.http.MediaType;
9
import org.springframework.http.ResponseEntity;
@@ -39,6 +41,7 @@ public class ApiExceptionHandler {
39
41
@ExceptionHandler(value = {
40
42
MethodArgumentNotValidException.class,
43
HttpMessageNotReadableException.class,
44
+ ConstraintViolationException.class,
45
})
46
public <T extends BindException> ResponseEntity<ApiExceptionHandlerExceptionMsgApiResponse> handleValidationException(final T e) {
47
0 commit comments