Error message not always propagated on 3.9.4 #8395
Labels
bug
client
need pull request
regression
Something that used to work stopped working "as before" after upgrade
reproducer: present
This PR or issue contains code, which reproduce the problem described or clearly understandable STR
Describe the bug
In 3.9.3 this would work and the
ClientResponseError
thrown would look like400, message='Got more than 8190 bytes (10000) when reading Header value is too long.', url=URL('http://127.0.0.1:51163/')
.Starting in 3.9.4 however an empty
ClientResponseError
seems to be raised0, message='', url=URL('http://127.0.0.1:51193/')
.I can see that the expected error message is thrown up the stack (specifically in
aiohttp/client_proto.py
) but the actual information about it is lost when it reachesaiohttp/client_reqrep.py
.To Reproduce
See repro case above.
Expected behavior
I expect
ClientResponseError
to have a 400 status rather than 0 and the message to be populated with the actual error.Logs/tracebacks
Python Version
3.11.8
aiohttp Version
multidict Version
yarl Version
OS
macos sonoma 14.4.1
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: