[Storage] Added retry logic in Blob download's process_content for ServiceResponseError#45055
Merged
weirongw23-msft merged 2 commits intoAzure:mainfrom Feb 11, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds retry logic to handle ServiceResponseError exceptions during blob download operations in the Azure Storage Blob SDK. The change ensures that transient connection errors (such as connection resets) encountered during content processing are properly retried rather than immediately failing.
Changes:
- Added
ServiceResponseErrorto the exception handling in blob downloadprocess_contentcalls for both sync and async implementations - Added comprehensive test coverage for both sync and async scenarios that validates retry behavior for
ServiceResponseErrorandServiceResponseTimeoutError
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| sdk/storage/azure-storage-blob/azure/storage/blob/_download.py | Added ServiceResponseError import and exception handling in two retry loops (_download_chunk and _initial_request methods) |
| sdk/storage/azure-storage-blob/azure/storage/blob/aio/_download_async.py | Added ServiceResponseError import and exception handling in two retry loops (_download_chunk and _initial_request methods) - async version |
| sdk/storage/azure-storage-blob/tests/test_retry.py | Added test case with ServiceResponseError and ServiceResponseTimeoutError imports and comprehensive test for retry behavior |
| sdk/storage/azure-storage-blob/tests/test_retry_async.py | Added test case with ServiceResponseError and ServiceResponseTimeoutError imports and comprehensive test for retry behavior - async version |
jalauzon-msft
approved these changes
Feb 11, 2026
weirongw23-msft
added a commit
to weirongw23-msft/azure-sdk-for-python
that referenced
this pull request
Feb 12, 2026
…`ServiceResponseError` (Azure#45055)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.