*Handle ProtocolError errors
This commit is contained in:
parent
27fa4b977b
commit
e371a85b24
|
@ -2,7 +2,7 @@
|
|||
// @ts-ignore
|
||||
import { loadTester, login } from "../dist/index.js";
|
||||
|
||||
import puppeteer, { Browser, Page } from "puppeteer";
|
||||
import puppeteer, { Browser, Page, ProtocolError } from "puppeteer";
|
||||
|
||||
let browser: Browser;
|
||||
|
||||
|
@ -17,3 +17,8 @@ let browser: Browser;
|
|||
process.on("SIGTERM", async () => {
|
||||
await browser.close();
|
||||
});
|
||||
process.on("uncaughtException", (e) => {
|
||||
if (!(e instanceof ProtocolError)) {
|
||||
throw e;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue