From 5d424e3703483ce046a1fc11cda0872b2551c907 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 14 Dec 2021 10:56:31 -0500 Subject: [PATCH] Hide the key error tb on remote starting errors --- tractor/_portal.py | 6 +++--- tractor/_streaming.py | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tractor/_portal.py b/tractor/_portal.py index 564d329..9b96bd2 100644 --- a/tractor/_portal.py +++ b/tractor/_portal.py @@ -428,12 +428,12 @@ class Portal: first = msg['started'] ctx._started_called = True - except KeyError: + except KeyError as kerr: assert msg.get('cid'), ("Received internal error at context?") if msg.get('error'): - # raise the error message - raise unpack_error(msg, self.channel) + # raise kerr from unpack_error(msg, self.channel) + raise unpack_error(msg, self.channel) from None else: raise diff --git a/tractor/_streaming.py b/tractor/_streaming.py index 05932b8..86060b9 100644 --- a/tractor/_streaming.py +++ b/tractor/_streaming.py @@ -425,7 +425,6 @@ class Context: f'Remote context error for {self.chan.uid}:{self.cid}:\n' f'{msg["error"]["tb_str"]}' ) - # await ctx._maybe_error_from_remote_msg(msg) self._error = unpack_error(msg, self.chan) # TODO: tempted to **not** do this by-reraising in a