> +
> +      Exception exception = message != null ? new 
> HttpResponseException(command, response, message)
> +            : new HttpResponseException(command, response);
> +      message = message != null ? message : String.format("%s -> %s", 
> command.getCurrentRequest().getRequestLine(),
> +            response.getStatusLine());
> +      switch (response.getStatusCode()) {
> +         case 400:
> +            break;
> +         case 401:
> +         case 403:
> +            exception = new AuthorizationException(message, exception);
> +            break;
> +         case 404:
> +            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
> +               exception = new ResourceNotFoundException(message, exception);
> +            }

```
case 409:
    exception = new IllegalStateException(exception.getMessage(), exception);
    break;
```

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/111/files#r15359280

Reply via email to