com.lotaris.jee.validation.ApiErrorsException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jee-validation Show documentation
Show all versions of jee-validation Show documentation
This library offers components that facilitate validation of arbitrary objects and how they are serialized towards a client.
It focuses on the wiring of the proposed patterns and does not contain any concrete validator implementations.
package com.lotaris.jee.validation;
/**
* Thrown to indicate that API-related errors occurred, typically during validation. This exception
* is automatically mapped to an HTTP 422 Unprocessable Entity API response.
*
* @author Simon Oulevay ([email protected])
* @see ApiErrorsExceptionMapper
*/
public class ApiErrorsException extends Exception {
private ApiErrorResponse errorResponse;
public ApiErrorsException(ApiErrorResponse errorResponse) {
this.errorResponse = errorResponse;
}
public ApiErrorResponse getErrorResponse() {
return errorResponse;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy