au.org.consumerdatastandards.holder.api.CustomExceptionHandler Maven / Gradle / Ivy
The newest version!
package au.org.consumerdatastandards.holder.api;
import au.org.consumerdatastandards.holder.model.Error;
import au.org.consumerdatastandards.holder.model.ErrorListResponse;
import au.org.consumerdatastandards.holder.util.WebUtil;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.util.MultiValueMap;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.context.request.WebRequest;
import org.springframework.web.method.annotation.MethodArgumentTypeMismatchException;
import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import java.util.ArrayList;
import java.util.UUID;
@ControllerAdvice
public class CustomExceptionHandler extends ResponseEntityExceptionHandler {
private static final String X_FAPI_INTERACTION_ID = "x-fapi-interaction-id";
@ExceptionHandler(ConstraintViolationException.class)
public ResponseEntity
© 2015 - 2024 Weber Informatics LLC | Privacy Policy