> +      byte[] data = closeClientButKeepContentStream(response);
> +      String message = data != null ? new String(data) : null;
> +
> +      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 401:
> +            exception = new AuthorizationException(exception.getMessage(), 
> exception);
> +            break;
> +         case 404:
> +            Exception oldException = exception;
> +            String sourcePath = 
> command.getCurrentRequest().getFirstHeaderOrNull(SwiftHeaders.OBJECT_COPY_FROM);
> +            if (sourcePath != null) {
> +               // the path returned here is in the form 
> "/v1/tenant-id/destContainer/destObject"

Just wanted to make sure that no unexpected api calls will throw a 404 and 
reach this code. If everything is under control and you are confident, it is ok 
to me :)

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

Reply via email to