Skip to content

docs(exceptions): clarify ChunkedEncodingError can result from transient network issues#7374

Closed
CodeLine9 wants to merge 1 commit intopsf:mainfrom
CodeLine9:clawoss/docs/chunked-encoding-error-docstring
Closed

docs(exceptions): clarify ChunkedEncodingError can result from transient network issues#7374
CodeLine9 wants to merge 1 commit intopsf:mainfrom
CodeLine9:clawoss/docs/chunked-encoding-error-docstring

Conversation

@CodeLine9
Copy link
Copy Markdown

The docstring for ChunkedEncodingError only mentions "server sent an invalid chunk" but this exception is also raised when the connection drops mid-stream during a chunked transfer (e.g. transient network interruption). The underlying ProtocolError from urllib3 covers both cases.

Added a clarifying note to the docstring so users know this error can result from transient issues and that retrying may succeed. This aligns with the discussion in #7341 and #4771.

Fixes #7341

…ent issues

The existing docstring only mentions "server sent an invalid chunk" but
this error is also raised when the connection is interrupted mid-stream
during a chunked response. Added a note about transient network issues
and retrying, matching maintainer feedback in psf#7341.

Fixes psf#7341
Copy link
Copy Markdown

@alokshukla631 alokshukla631 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reads well to me. Calling out the transient-network case in the docstring should save people a trip through urllib3 internals.

@nateprewitt nateprewitt added the mass-automation-pr This PR was created from an account spamming large projects with "fixes". label Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mass-automation-pr This PR was created from an account spamming large projects with "fixes".

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation for ChunkedEncodingError is either incorrect or very misleading

3 participants