mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 21:10:29 +00:00
Fix rpc_message_to_error failing to construct them
This commit is contained in:
@@ -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))
|
||||||
|
Reference in New Issue
Block a user