[BUG] Response was not set, make sure SendAsync was called #47917
Labels
Azure.Core
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
Library name and version
Azure.Storage.Blobs 12.23.0
Describe the bug
Sometimes when calling methods in Azure.Storage.Blobs, an InvalidOperationException is thrown with the message
Response was not set, make sure SendAsync was called
.Expected behavior
Methods should not throw, or should throw
RequestFailedException
.Actual behavior
Attached a partial stack trace from App Insights where
Azure.Core.Pipeline.RedirectPolicy.ProcessAsync
is the final call, implying it's the cause:error.json
It looks like it comes from this line, which accesses
message.Response
:azure-sdk-for-net/sdk/core/Azure.Core/src/Pipeline/RedirectPolicy.cs
Line 57 in a915359
Other places in code (e.g., RetryPolicy) check whether a Response exists before accessing the property:
azure-sdk-for-net/sdk/core/Azure.Core/src/Pipeline/RetryPolicy.cs
Line 117 in a915359
Reproduction Steps
Random.
Environment
No response
The text was updated successfully, but these errors were encountered: