From fcd089c08f95179da26833ab10921806a586fca6 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 30 May 2024 16:02:25 -0400 Subject: [PATCH] Always `.exception()` in `try_ship_error_to_remote()` on internal error --- tractor/_rpc.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tractor/_rpc.py b/tractor/_rpc.py index daf1ec8..8a1be7b 100644 --- a/tractor/_rpc.py +++ b/tractor/_rpc.py @@ -80,7 +80,6 @@ from tractor.msg.types import ( Yield, ) - if TYPE_CHECKING: from ._runtime import Actor @@ -328,7 +327,6 @@ async def _errors_relayed_via_ipc( f'|_{ctx}' ) - # ALWAYS try to ship RPC errors back to parent/caller task if is_rpc: @@ -819,6 +817,12 @@ async def try_ship_error_to_remote( # TODO: use `.msg.preetty_struct` for this! f'{msg}\n' ) + except BaseException: + log.exception( + 'Errored while attempting error shipment?' + ) + __tracebackhide__: bool = False + raise async def process_messages(