diff --git a/geowebcache/azureblob/src/main/java/org/geowebcache/azure/AzureClient.java b/geowebcache/azureblob/src/main/java/org/geowebcache/azure/AzureClient.java index 2c5bae344..cd4475de1 100644 --- a/geowebcache/azureblob/src/main/java/org/geowebcache/azure/AzureClient.java +++ b/geowebcache/azureblob/src/main/java/org/geowebcache/azure/AzureClient.java @@ -93,8 +93,13 @@ public AzureClient(AzureBlobStoreData configuration) throws StorageException { this.container = serviceURL.createContainerURL(containerName); // no way to see if the containerURL already exists, try to create and see if // we get a 409 CONFLICT + int status; + try { + status = this.container.getProperties().blockingGet().statusCode(); + } catch (com.microsoft.azure.storage.blob.StorageException se) { + status = se.statusCode(); + } try { - int status = this.container.getProperties().blockingGet().statusCode(); if (status == HttpStatus.NOT_FOUND.value()) { status = this.container.create(null, null, null).blockingGet().statusCode(); if (!HttpStatus.valueOf(status).is2xxSuccessful()