Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-899

Google cloud storage returns null when creating a bucket on conflict (409)

    XMLWordPrintableJSON

    Details

      Description

      Google cloud storage registers the following fallback handler:

      public final class GoogleCloudStorageFallbacks {
          public static final class NullOnBucketAlreadyExists implements Fallback<Object> {
             public Object createOrPropagate(Throwable t) throws Exception {
               if (checkNotNull(t, "throwable") instanceof IllegalStateException) {
                  return null;
               }
               throw propagate(t);
            }
         }
      }
      

      which returns null when a bucket exists (and may be owned by someone else). In a similar situation, S3 throws a ResourceAlreadyExists exception. I did notice that there is a unit test for this behavior in jclouds-google-storage, so it's clearly the intended behavior, but it does deviate from the other providers. I'd appreciate if someone could shine some light on why this handler was added. It'd be nice to have the interface be consistent between the providers.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              timuralp Timur Alperovich
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: