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;
}