// parse the response to get error
final LoginError error = objectMapper.readValue(responseContent, LoginError.class);
final String msg = String.format("Login error code:[%s] description:[%s]",
error.getError(), error.getErrorDescription());
final List<RestError> errors = new ArrayList<RestError>();
errors.add(new RestError(msg, error.getErrorDescription()));
throw new SalesforceException(errors, HttpStatus.BAD_REQUEST_400);
default:
throw new SalesforceException(String.format("Login error status:[%s] reason:[%s]",
responseStatus, loginPost.getReason()), responseStatus);