use of com.emc.vipr.client.exceptions.ValidationException in project coprhd-controller by CoprHD.
the class ValidationErrorFilter method handle.
@Override
public ClientResponse handle(ClientRequest request) throws ClientHandlerException {
ClientResponse response = getNext().handle(request);
int status = response.getStatus();
if (supportsPortalValidation(request) && status == 400) {
List<ValidationError> errorsList = ApiListUtils.getEntityList(config, new GenericType<List<ValidationError>>() {
}, response);
ValidationException exception = new ValidationException(response.getStatus(), errorsList);
LOG.error(exception.getMessage());
throw exception;
}
return response;
}
Aggregations