Skip to content

docs: improve ChunkedEncodingError docstring with retry guidance#7347

Open
Bahtya wants to merge 1 commit intopsf:mainfrom
Bahtya:fix/chunked-encoding-error-docs
Open

docs: improve ChunkedEncodingError docstring with retry guidance#7347
Bahtya wants to merge 1 commit intopsf:mainfrom
Bahtya:fix/chunked-encoding-error-docs

Conversation

@Bahtya
Copy link
Copy Markdown

@Bahtya Bahtya commented Apr 8, 2026

Problem

ChunkedEncodingError is commonly caused by transient network issues (connection drops mid-stream) that corrupt chunked transfer encoding, not just server-side bugs. The current docstring only mentions "invalid chunk" which is misleading.

Solution

Expanded the docstring to mention transient network issues and that retrying may succeed. This addresses the confusion documented in #4771 and #7341.

Fixes #7341

The existing docstring only mentions invalid chunks from the server,
but ChunkedEncodingError is also commonly caused by transient network
issues that corrupt the chunked transfer encoding mid-stream. Users
should know that retrying may succeed.

Fixes psf#7341

Signed-off-by: bahtya <bahtyar153@qq.com>
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.

Documentation for ChunkedEncodingError is either incorrect or very misleading

1 participant