Hide the key error tb on remote starting errors

expected_ctx_cancelled
Tyler Goodlet 2021-12-14 10:56:31 -05:00
parent c38d0f826e
commit 5d424e3703
2 changed files with 3 additions and 4 deletions

View File

@ -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

View File

@ -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