Skip to content

Commit f24c571

Browse files
authored
Merge pull request #56 from SelimHorri/test
Test
2 parents 30d89e7 + 597f6a1 commit f24c571

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/tn/cita/app/exception/ApiExceptionHandler.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.util.Optional;
44

5+
import javax.validation.ConstraintViolationException;
6+
57
import org.springframework.http.HttpStatus;
68
import org.springframework.http.MediaType;
79
import org.springframework.http.ResponseEntity;
@@ -39,6 +41,7 @@ public class ApiExceptionHandler {
3941
@ExceptionHandler(value = {
4042
MethodArgumentNotValidException.class,
4143
HttpMessageNotReadableException.class,
44+
ConstraintViolationException.class,
4245
})
4346
public <T extends BindException> ResponseEntity<ApiExceptionHandlerExceptionMsgApiResponse> handleValidationException(final T e) {
4447

0 commit comments

Comments
 (0)