changes
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package com.cfdeployer.exception;
|
||||
|
||||
import com.cfdeployer.model.CfDeployResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.FieldError;
|
||||
@@ -14,10 +15,11 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@RestControllerAdvice
|
||||
public class GlobalExceptionHandler {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class);
|
||||
|
||||
@ExceptionHandler(MethodArgumentNotValidException.class)
|
||||
public ResponseEntity<CfDeployResponse> handleValidationExceptions(MethodArgumentNotValidException ex) {
|
||||
log.error("Validation error occurred", ex);
|
||||
|
||||
Reference in New Issue
Block a user