From d0e76100735c3f817fadf85fa32e462defa76a19 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 17 Apr 2024 23:19:31 -0400 Subject: [PATCH] The src error to `_raise_from_no_key_in_msg()` is always an attr-error now! --- tractor/_exceptions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tractor/_exceptions.py b/tractor/_exceptions.py index 65637fb..4ace626 100644 --- a/tractor/_exceptions.py +++ b/tractor/_exceptions.py @@ -935,7 +935,7 @@ def is_multi_cancelled(exc: BaseException) -> bool: def _raise_from_no_key_in_msg( ctx: Context, msg: MsgType, - src_err: KeyError, + src_err: AttributeError, log: StackLevelAdapter, # caller specific `log` obj expect_msg: str = Yield, @@ -994,7 +994,7 @@ def _raise_from_no_key_in_msg( ctx.chan, hide_tb=hide_tb, - ) from None + ) from src_err # `MsgStream` termination msg. # TODO: does it make more sense to pack