> @@ -163,10 +157,10 @@ Bucket createBuckets(@QueryParam("project") String 
> projectNumber,
>     @OAuthScopes(STORAGE_FULLCONTROL_SCOPE)
>     @Fallback(NullOnNotFoundOr404.class)
>     @Nullable
> -   HttpResponse deleteBuckets(@PathParam("bucket") String bucketName);
> +   HttpResponse deleteBucket(@PathParam("bucket") String bucketName);

The way jclouds handles this is by using custom 
[HttpErrorHandlers](https://github.com/jclouds/jclouds/blob/master/core/src/main/java/org/jclouds/http/HttpErrorHandler.java).
 You should write an error handler for this provider (you can take the 
[NovaErrorHandler](https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/handlers/NovaErrorHandler.java)
 as an example) and configure it in the `GoogleCloudStorageHttpApiModule` 
similar to how the Nova one [is 
configured](https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/config/NovaRestClientModule.java#L183-L188).

Then you can inspect the response code and the message in the handler and 
propagate an appropriate exception. Also consider changing the signature of the 
method to return `void` after implementing this.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/33/files#r14766605

Reply via email to