Skip to content

Commit 976f04f

Browse files
authored
fix: ignore exceptions from updateInterceptorPatterns (#2317)
1 parent 51bab39 commit 976f04f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

playwright/_impl/_page.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,16 @@ async def _on_route(self, route: Route) -> None:
262262
handled = await route_handler.handle(route)
263263
finally:
264264
if len(self._routes) == 0:
265+
266+
async def _update_interceptor_patterns_ignore_exceptions() -> None:
267+
try:
268+
await self._update_interception_patterns()
269+
except Error:
270+
pass
271+
265272
asyncio.create_task(
266273
self._connection.wrap_api_call(
267-
lambda: self._update_interception_patterns(), True
274+
_update_interceptor_patterns_ignore_exceptions, True
268275
)
269276
)
270277
if handled:

0 commit comments

Comments
 (0)