com.nike.backstopper.exception.ClientDataValidationError Maven / Gradle / Ivy
Show all versions of backstopper-core Show documentation
package com.nike.backstopper.exception;
import java.util.List;
import javax.validation.ConstraintViolation;
/**
* A runtime exception representing a CLIENT DATA JSR 303 validation failure (i.e. a validation error with data
* passed to the server from the client where the client violated a contract; something that the client has control
* over and can fix by changing what they send the server).
*
* If a controller (or its delegate) throws one of these then it will be caught by a
* {@link com.nike.backstopper.handler.ApiExceptionHandlerBase} via
* {@link com.nike.backstopper.handler.listener.impl.ClientDataValidationErrorHandlerListener} and
* turned into the appropriate set of {@link com.nike.backstopper.apierror.ApiError}s for the client, along with logging
* as much data about this error as possible for debugging purposes.
*
*
NOTE: As mentioned previously this exception is for validation errors where the client sending the data
* violated a contract and can fix the problem themselves. If you have a validation error with data sent between this
* app and a downstream service where the client has no control, then you should use
* {@link com.nike.backstopper.exception.ServersideValidationError} instead.
*
* @author Nic Munroe
*/
public class ClientDataValidationError extends RuntimeException {
private final List