Skip to content

ignore stream consumption errors when reading streams before throwing an error #2685

@iscai-msft

Description

@iscai-msft

Currently, we always read a stream right before an error is thrown (code). However, some teams, such as the storage team, pre-read the errors in their pipelines. This is valid behavior since everyone can have their own response policies. We don't want to raise in this case, since the whole point of this code is just to make sure the error is read before we throw, so we shouldn't error out if the error is read by a previous policy.

To fix, we're going to read the response in a try catch block, and not raise if there's a StreamConsumedError or a StreamClosedError.

cc @vincenttran-msft @jalauzon-msft

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions