Skip to content

Parse HTTP errors before writing media downloads - #174

Merged
omarryhan merged 3 commits into
omarryhan:masterfrom
Kulraj69:fix/120-preserve-download-errors
Nov 1, 2026
Merged

omarryhan merged 3 commits into
omarryhan:masterfrom
Kulraj69:fix/120-preserve-download-errors

Conversation

@Kulraj69

Copy link
Copy Markdown
Contributor

Fixes #120. Failed media downloads currently write the API error into the destination file or pipe, potentially overwriting an existing file. This change parses HTTP errors before the download writer runs, preserving the destination and the API's error details.

All 16 localhost HTTP regression/control tests pass after the fix; 14 fail on unchanged upstream. The broader selected suite passes 96 tests, including those 16. Another 96 API-definition tests pass. This is not a full-suite or authenticated Google test. No existing tests were changed.

AI-assisted implementation and testing.

@omarryhan
omarryhan merged commit 39907be into omarryhan:master Nov 1, 2026
8 checks passed
@omarryhan

Copy link
Copy Markdown
Owner

Thanks for your contribution, @Kulraj69! This is now released in v5.20.0 and available on PyPI:

pip install -U aiogoogle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HttpError doesn't include JSON error response with the "pipe_to" option enabled

2 participants