[BUG] Equality failures due to implicit cast on RequestFailedException.ErrorCode #44213
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
Storage
Storage Service (Queues, Blobs, Files)
Library name and version
Azure.Storage.Blobs 12.19.1.0
Describe the bug
In several places in the SDK, comparing
RequestFailedException.ErrorCode
to a strongly typed*ErrorCode
type (e.g.BlobErrorCode)
can throw an exception.This is because:
RequestFailedException.ErrorCode
is nullable==
comparisons to*ErrorCode
*ErrorCode
throws if a null is receivedThis goes against the guideline of
Expected behavior
No exception is thrown; in the Reproduction Steps case below,
isContainerError
isfalse
if inspected.Actual behavior
An
ArgumentNullException
is thrown.Reproduction Steps
Environment
No response
The text was updated successfully, but these errors were encountered: