logger.debug("Empty response !");
}
}
} catch(ExecutionException e) {
if(e.getCause() instanceof RestException) {
RestException exception = (RestException) e.getCause();
if(logger.isDebugEnabled()) {
logger.debug("REST EXCEPTION STATUS : " + exception.getResponse().getStatus());
}
int httpErrorStatus = exception.getResponse().getStatus();
if(httpErrorStatus == BAD_REQUEST.getCode()) {
throw new VoldemortException("Bad request: " + e.getMessage(), e);
} else if(httpErrorStatus == PRECONDITION_FAILED.getCode()) {
throw new ObsoleteVersionException(e.getMessage());
} else if(httpErrorStatus == REQUEST_TIMEOUT.getCode()