Skip to content

Commit

Permalink
#91 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KSemenenko committed Jun 23, 2024
1 parent e49b882 commit 34b806b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Storages/ManagedCode.Storage.Azure/AzureStorage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,17 @@ protected override async Task<Result> CreateContainerInternalAsync(CancellationT
await StorageClient.SetAccessPolicyAsync(StorageOptions.PublicAccessType, cancellationToken: cancellationToken);
}

IsContainerCreated = await StorageClient.ExistsAsync(cancellationToken);
;
try
{
IsContainerCreated = await StorageClient.ExistsAsync(cancellationToken);
}
catch (RequestFailedException e)
{
logger.LogException(e);
//probably we don't have permission to check if container exists
IsContainerCreated = true;
}


return Result.Succeed();
}
Expand Down

0 comments on commit 34b806b

Please sign in to comment.