Skip to content

[BUG] [Storage] ShareClient.DeleteIfExists throws if the Error code is ShareSnapshotNotFound #48115

Open
@amnguye

Description

@amnguye

Library name and version

Azure.Storage.Files.Shares

Describe the bug

When deleting a Share Snapshot using ShareClient.DeleteIfExists the call will throw an exception with ShareSnapshotNotFound. This should be included in the list of error codes.

Expected behavior

ShareClient.DeleteIfExists does not throw when seeing ShareSnapshotNotFound error code. And returns back false wrapped in the Response

Actual behavior

Throws a RequestFailedException.

Reproduction Steps

ShareClient shareClient = shareServiceClient.GetShareClient("target").WithSnapshot("2025-02-04T10:17:47.0000000Z");
shareClient.DeleteIfExists();

Environment

n/a

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.StorageStorage Service (Queues, Blobs, Files)bugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions