From d8129ee6f36eaac8a0812f69298e6aeb9ad39292 Mon Sep 17 00:00:00 2001 From: m5l14i11 Date: Sat, 14 Sep 2024 17:54:54 +0300 Subject: [PATCH] upd --- exchange/_bybit_ws.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exchange/_bybit_ws.py b/exchange/_bybit_ws.py index 195ee04e..0fc6c4dd 100644 --- a/exchange/_bybit_ws.py +++ b/exchange/_bybit_ws.py @@ -65,7 +65,7 @@ async def _connect(self): logger.info("WebSocket connection established.") except Exception as e: logger.error(f"Failed to connect to WebSocket: {e}") - raise ConnectionError(e) + raise ConnectionError("Failed to connect to WebSocket") from None @retry( max_retries=13, @@ -150,7 +150,7 @@ async def _wait_for_ws(self, timeout=10): await asyncio.wait_for(self._check_ws_open(), timeout=timeout) except asyncio.TimeoutError: logger.error("Timed out waiting for WebSocket to open.") - raise ConnectionError("WebSocket connection timeout.") + raise ConnectionError("WebSocket connection timeout.") from None async def _check_ws_open(self): while not self.ws or not self.ws.open: