Skip to content

[BUG] Response was not set, make sure SendAsync was called #47917

Open
@aspallsux

Description

@aspallsux

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:

Response response = message.Response;

Other places in code (e.g., RetryPolicy) check whether a Response exists before accessing the property:

if (lastException != null || (message.HasResponse && message.Response.IsError))

Reproduction Steps

Random.

Environment

No response

Metadata

Metadata

Assignees

Labels

Azure.CoreClientThis issue points to a problem in the data-plane of the library.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 teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions