> +   @Named("b2_create_bucket")
> +   @POST
> +   @Path("/b2api/v1/b2_create_bucket")
> +   @MapBinder(BindToJsonPayload.class)
> +   @PayloadParams(keys = {"accountId"}, values = {"{jclouds.identity}"})
> +   @Consumes(APPLICATION_JSON)
> +   @Produces(APPLICATION_JSON)
> +   Bucket createBucket(@PayloadParam("bucketName") String bucketName, 
> @PayloadParam("bucketType") BucketType bucketType);
> +
> +   @Named("b2_delete_bucket")
> +   @POST
> +   @Path("/b2api/v1/b2_delete_bucket")
> +   @MapBinder(BindToJsonPayload.class)
> +   @PayloadParams(keys = {"accountId"}, values = {"{jclouds.identity}"})
> +   @Consumes(APPLICATION_JSON)
> +   @Produces(APPLICATION_JSON)

Now that it turns it into that exception, adding the 
`@Fallback(NullOnNotFoundOr404.class)` would already work (as it looks for 404 
errors or exceptions that are instanceof ResoueceNotFoundException).
With that fallback method would return just `null` if the object didn't already 
exist instead of throwing an exception, which is a pretty common pattern in 
most of the jclouds APIs. Worth adding the fallback? 

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/270/files/8bb355e1b286b2bbf77fd8d3cb75cd2d1aa6bc69#r64637406

Reply via email to