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