From 22556f3ff2dcc256ef8e3e930e46037d73976d01 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Mon, 26 Feb 2024 19:06:57 +0100 Subject: [PATCH] error handlign --- playwright/_impl/_connection.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/playwright/_impl/_connection.py b/playwright/_impl/_connection.py index db156fec1..ba6a8ba9f 100644 --- a/playwright/_impl/_connection.py +++ b/playwright/_impl/_connection.py @@ -78,14 +78,13 @@ async def inner_send( ) -> Any: if params is None: params = {} - callback = self._connection._send_message_to_server( - self._object, method, _filter_none(params) - ) if self._connection._error: error = self._connection._error self._connection._error = None - callback.future.cancel() raise error + callback = self._connection._send_message_to_server( + self._object, method, _filter_none(params) + ) done, _ = await asyncio.wait( { self._connection._transport.on_error_future,