diff --git a/apis/rackspace-cloudfiles/src/main/java/org/jclouds/rackspace/cloudfiles/v1/handlers/CloudFilesErrorHandler.java b/apis/rackspace-cloudfiles/src/main/java/org/jclouds/rackspace/cloudfiles/v1/handlers/CloudFilesErrorHandler.java index 99e0d885f0..875544da3a 100644 --- a/apis/rackspace-cloudfiles/src/main/java/org/jclouds/rackspace/cloudfiles/v1/handlers/CloudFilesErrorHandler.java +++ b/apis/rackspace-cloudfiles/src/main/java/org/jclouds/rackspace/cloudfiles/v1/handlers/CloudFilesErrorHandler.java @@ -77,9 +77,6 @@ public class CloudFilesErrorHandler implements HttpErrorHandler { case 413: exception = new InsufficientResourcesException(exception.getMessage(), exception); break; - case 416: - exception = new IllegalArgumentException(exception.getMessage(), exception); - break; } command.setException(exception); } diff --git a/apis/sts/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java b/apis/sts/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java index 6160f86f41..c298fc79a4 100644 --- a/apis/sts/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java +++ b/apis/sts/src/main/java/org/jclouds/aws/handlers/ParseAWSErrorFromXmlContent.java @@ -133,11 +133,6 @@ public class ParseAWSErrorFromXmlContent implements HttpErrorHandler { exception = new IllegalStateException(message, exception); } break; - case 416: - if ("InvalidRange".equals(errorCode)) { - exception = new IllegalArgumentException(message, exception); - } - break; } return exception; } diff --git a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java index 56a0691b50..6602360d6e 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/config/LocalBlobStore.java @@ -704,11 +704,11 @@ public final class LocalBlobStore implements BlobStore { offset = Long.parseLong(firstLast[0]); last = Long.parseLong(firstLast[1]); } else { - throw new IllegalArgumentException("illegal range: " + s); + throw new HttpResponseException("illegal range: " + s, null, null); } if (offset >= blob.getPayload().getContentMetadata().getContentLength()) { - throw new IllegalArgumentException("illegal range: " + s); + throw new HttpResponseException("illegal range: " + s, null, null); } if (last + 1 > blob.getPayload().getContentMetadata().getContentLength()) { last = blob.getPayload().getContentMetadata().getContentLength() - 1;