Client.send: raise StreamClosed instead of RuntimeError on closed client?
#3575
-
|
aio-libs/aiobotocore#1085 is working on replacing aiohttp with httpx, and we would like to handle premature client closings as a "retryable exception" without having to catch an exception as wide as Lines 900 to 901 in 15e21e9 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Thanks for the conversation @jakkdl. We could use a custom exception here. I've preferred not to do that because I didn't/don't consider this a catchable case.
It's not obvious to me how you're running into this, since Edit... Perhaps this helps?... this isn't a retryable network error condition, this is a condition where the |
Beta Was this translation helpful? Give feedback.
Thanks for the conversation @jakkdl.☺️
We could use a custom exception here. I've preferred not to do that because I didn't/don't consider this a catchable case.
It's not obvious to me how you're running into this, since
aiohttpsensibly enforces strictly context managed client lifetimes.Edit... Perhaps this helps?... this isn't a retryable network error condition, this is a condition where the
Clientinstance is out-of-scope (?)