ConnectionPool and AsyncConnectionPool remove the underlying __cause__ of the exception #991
Unanswered
jhominal
asked this question in
Potential Issue
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have found that both synchronous and asynchronous connection pools will catch an error in
handle_(async_)request
and re-raise it while clearing out the__cause__
(withraise exc from None
)Why do we clear the
__cause__
in this case? This is particularly bothersome for me becauseanyio
does not usually set messages when raisingBrokenResourceError
(and other exceptions), and that results in me having only ahttpcore.ReadError
with an empty message, which is not very useful.In other words: I would llike to modify that line in
connection_pool
so that__cause__
is not replaced withNone
, and so that the underlying error can appear when I collect tracebacks.Beta Was this translation helpful? Give feedback.
All reactions