Skip to content

Commit

Permalink
error handlign
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt committed Feb 26, 2024
1 parent 5f390a8 commit 22556f3
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions playwright/_impl/_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 22556f3

Please sign in to comment.