Show more meaningful errors for wrapped queries
This commit is contained in:
parent
0684a4ba93
commit
2bf6357bad
@ -420,6 +420,9 @@ class Session:
|
||||
if result is None:
|
||||
raise TimeoutError
|
||||
elif isinstance(result, types.RpcError):
|
||||
if isinstance(data, (functions.InvokeWithoutUpdates, functions.InvokeWithTakeout)):
|
||||
data = data.query
|
||||
|
||||
RPCError.raise_it(result, type(data))
|
||||
elif isinstance(result, types.BadMsgNotification):
|
||||
raise Exception(self.BAD_MSG_DESCRIPTION.get(
|
||||
|
Loading…
Reference in New Issue
Block a user