mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-25 19:03:46 +03:00
Fix rpc_message_to_error failing to construct them
This commit is contained in:
parent
74a851b5cc
commit
be33ae4e80
|
@ -32,12 +32,12 @@ def rpc_message_to_error(code, message):
|
||||||
return cls(extra=extra)
|
return cls(extra=extra)
|
||||||
|
|
||||||
elif code == 403:
|
elif code == 403:
|
||||||
return ForbiddenError()
|
return ForbiddenError(message)
|
||||||
|
|
||||||
elif code == 404:
|
elif code == 404:
|
||||||
return NotFoundError()
|
return NotFoundError(message)
|
||||||
|
|
||||||
elif code == 500:
|
elif code == 500:
|
||||||
return ServerError()
|
return ServerError(message)
|
||||||
|
|
||||||
return RPCError('{} (code {})'.format(message, code))
|
return RPCError('{} (code {})'.format(message, code))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user