From a65f8e2655e8ef7e4eefb4383f9a4306d9e9f1f1 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 20 Jun 2021 08:52:11 +0200 Subject: [PATCH] Clearer error message --- pyrogram/crypto/mtproto.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/crypto/mtproto.py b/pyrogram/crypto/mtproto.py index dad30cd3..803db297 100644 --- a/pyrogram/crypto/mtproto.py +++ b/pyrogram/crypto/mtproto.py @@ -72,7 +72,7 @@ def unpack(b: BytesIO, session_id: bytes, auth_key: bytes, auth_key_id: bytes) - left = [[left[i:i + 8] for i in range(0, len(left), 8)] for left in left] left = "\n".join(" ".join(x for x in left) for left in left) - raise ValueError(f"Unknown constructor found: {hex(e.args[0])}\n{left}") + raise ValueError(f"The server sent an unknown constructor: {hex(e.args[0])}\n{left}") # https://core.telegram.org/mtproto/security_guidelines#checking-sha256-hash-value-of-msg-key # https://core.telegram.org/mtproto/security_guidelines#checking-message-length