Exception exception = message != null ? new HttpResponseException(command, response, message)
: new HttpResponseException(command, response);
Set<ErrorResponse> errors = parseErrorsFromContentOrNull(data);
if (errors != null)
exception = new GoGridResponseException(command, response, errors);
switch (response.getStatusCode()) {
case 400:
if (Iterables.get(errors, 0).getMessage().indexOf("No object found") != -1) {
exception = new ResourceNotFoundException(Iterables.get(errors, 0).getMessage(), exception);
break;