Skip to content

Avoid read response again when LRO operation raises HttpResponseError #31709

@msyyc

Description

@msyyc

Describe the bug

Start from last year, Python SDK set strea=True when making http request (e.g. here). If HttpResponseError raised, SDK will read the response before raise it so that SDK users don't need to read it to get complete response error info. But I notice some CLI commands try to read the response again (e.g. here) which may meet StreamConsumedError/StreamClosedError since the response has already consumed innter SDK.

Related command

az deployment group create --resource-group <resource-group> --template-file main.bicep

Errors

see #31581 (comment)

Issue script & Debug output

see #31581 (comment)

Expected behavior

see #31581 (comment)

Environment Summary

see #31581 (comment)

Additional context

This issue may be the root cause of #31581

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure Deploymentsaz deployment/bicep/stack/deployment-scripts/ts/group exportService AttentionThis issue is responsible by Azure service team.bugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions