1
0

interface: also log cancellations in send_request

This commit is contained in:
SomberNight
2024-03-14 12:52:11 +00:00
parent 99f6dd5d5d
commit fef895295f

View File

@@ -170,10 +170,14 @@ class NotificationSession(RPCSession):
super().send_request(*args, **kwargs),
timeout)
except (TaskTimeout, asyncio.TimeoutError) as e:
self.maybe_log(f"--> request timed out: {args} (id: {msg_id})")
raise RequestTimedOut(f'request timed out: {args} (id: {msg_id})') from e
except CodeMessageError as e:
self.maybe_log(f"--> {repr(e)} (id: {msg_id})")
raise
except BaseException as e: # cancellations, etc. are useful for debugging
self.maybe_log(f"--> {repr(e)} (id: {msg_id})")
raise
else:
self.maybe_log(f"--> {response} (id: {msg_id})")
return response