From be33ae4e800619e0c50ef9dd7ce5e135e2ebb54b Mon Sep 17 00:00:00 2001 From: Lonami Date: Sat, 17 Jun 2017 08:25:48 +0200 Subject: [PATCH] Fix rpc_message_to_error failing to construct them --- telethon/errors/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/telethon/errors/__init__.py b/telethon/errors/__init__.py index 7e781968..08ccee20 100644 --- a/telethon/errors/__init__.py +++ b/telethon/errors/__init__.py @@ -32,12 +32,12 @@ def rpc_message_to_error(code, message): return cls(extra=extra) elif code == 403: - return ForbiddenError() + return ForbiddenError(message) elif code == 404: - return NotFoundError() + return NotFoundError(message) elif code == 500: - return ServerError() + return ServerError(message) return RPCError('{} (code {})'.format(message, code))