Improve "Execution context was destroyed" error handling

This commit is contained in:
ngosang 2021-08-01 22:10:53 +02:00
parent 9dae74bc28
commit 447c8f67a1

View File

@ -73,7 +73,9 @@ export default async function resolveChallenge(url: string, page: Page, response
} catch (error)
{
log.debug("Unexpected error: " + error);
break
if (!error.toString().includes("Execution context was destroyed")) {
break
}
}
log.debug('Waiting for Cloudflare challenge...')