diff --git a/src/Azure/Shared/Storage/AzureTableDataManager.cs b/src/Azure/Shared/Storage/AzureTableDataManager.cs index f4a92020c14..212ea9abd7e 100644 --- a/src/Azure/Shared/Storage/AzureTableDataManager.cs +++ b/src/Azure/Shared/Storage/AzureTableDataManager.cs @@ -81,10 +81,10 @@ public async Task InitTableAsync() { TableServiceClient tableCreationClient = await GetCloudTableCreationClientAsync(); var table = tableCreationClient.GetTableClient(TableName); - var tableItem = await table.CreateIfNotExistsAsync(); - var didCreate = tableItem is not null; + var response = await table.CreateIfNotExistsAsync(); + var alreadyExisted = response.GetRawResponse().Status == (int)HttpStatusCode.Conflict; - LogInfoTableCreation(Logger, didCreate ? "Created" : "Attached to", TableName); + LogInfoTableCreation(Logger, alreadyExisted ? "Attached to" : "Created", TableName); Table = table; } catch (TimeoutException te)