Class ValidationErrorHandler
java.lang.Object
com.mirna.hospitalmanagementapi.infra.handlers.validation.ValidationErrorHandler
This @RestControllerAdvice is used to handle validation errors and return appropriate response messages
- Version:
- 1.0
- Author:
- Mirna Gama
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ValidationErrorHandler
public ValidationErrorHandler()
-
-
Method Details
-
handle
@ResponseStatus(code=BAD_REQUEST) @ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<Object> handle(org.springframework.web.bind.MethodArgumentNotValidException expection)
-