Skip to content

Commit

Permalink
chore(minor): add error handling cdp connect
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mendez committed Mar 6, 2024
1 parent f6369af commit 3d60dc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion kayle/lib/utils/go-to-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ export const setCDPIntercept = async (o: Partial<RunnerConfig>) => {
o.page._client();

if (!cdpSession) {
o.cdpSession = await o.page.context().newCDPSession(o.page);
try {
o.cdpSession = await o.page.context().newCDPSession(o.page);
} catch(e) {
console.error(e)
}
}

await sendCDPPageConfigurationEnable(o.cdpSession ?? cdpSession, o);
Expand Down
2 changes: 1 addition & 1 deletion kayle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kayle",
"version": "0.8.23",
"version": "0.8.24",
"description": "Extremely fast and accurate accessibility engine built for any headless tool like playwright or puppeteer.",
"main": "./build/index.js",
"keywords": [
Expand Down

0 comments on commit 3d60dc6

Please sign in to comment.