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))