From f935477e66622d8ee8bbdec45047a4841eb67003 Mon Sep 17 00:00:00 2001 From: JinmingHu Date: Mon, 11 Jan 2021 13:10:35 +0800 Subject: [PATCH] also swallow exception when container doesn't exist for DeleteIfExists (#1304) --- sdk/storage/azure-storage-blobs/src/blob_client.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azure-storage-blobs/src/blob_client.cpp b/sdk/storage/azure-storage-blobs/src/blob_client.cpp index ec05cba6b..b23829c74 100644 --- a/sdk/storage/azure-storage-blobs/src/blob_client.cpp +++ b/sdk/storage/azure-storage-blobs/src/blob_client.cpp @@ -631,7 +631,8 @@ namespace Azure { namespace Storage { namespace Blobs { } catch (StorageException& e) { - if (e.StatusCode == Core::Http::HttpStatusCode::NotFound && e.ErrorCode == "BlobNotFound") + if (e.StatusCode == Core::Http::HttpStatusCode::NotFound + && (e.ErrorCode == "BlobNotFound" || e.ErrorCode == "ContainerNotFound")) { return Azure::Core::Response(std::move(e.RawResponse)); }