puppeteer-extra
puppeteer-extra copied to clipboard
Ability to handle unhandled rejections in puppeteer-extra
The calls to e.g. page.evaluateOnNewDocument
within the puppeteer-extra modules are not wrapped with a try/catch, so if a page gets redirected whilst processing, these calls end up throwing unhandled rejections with e.g. Target closed errors.
Is there a way you could wrap these calls and let us pass in an option specifying whether we want to throw or swallow these errors. At the moment I think the only way to handle these is to have a global unhandledRejection handler.