From 9279b67319b8d39898212d53d6b725a92e963fff Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Thu, 10 Feb 2022 20:15:48 +0100 Subject: [PATCH] Display a more meaningful error message --- pyrogram/connection/connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyrogram/connection/connection.py b/pyrogram/connection/connection.py index 2173c70b..618c92a5 100644 --- a/pyrogram/connection/connection.py +++ b/pyrogram/connection/connection.py @@ -79,8 +79,8 @@ class Connection: async def send(self, data: bytes): try: await self.protocol.send(data) - except Exception: - raise OSError + except Exception as e: + raise OSError(e) async def recv(self) -> Optional[bytes]: return await self.protocol.recv()