httpExchange.getResponseContent(), new TypeReference<List<RestError>>() {
}
);
return new SalesforceException(restErrors, httpExchange.getResponseStatus());
} else {
RestErrors errors = new RestErrors();
xStream.fromXML(httpExchange.getResponseContent(), errors);
return new SalesforceException(errors.getErrors(), httpExchange.getResponseStatus());
}
} catch (IOException e) {
// log and ignore
String msg = "Unexpected Error parsing " + format + " error response: " + e.getMessage();
log.warn(msg, e);