Currently, when using the puppeteer-extra-plugin-recaptcha package with throwOnError set to true and a PuppeteerExtraPluginRecaptcha error is thrown here, the argument passed to Error is an object. So the information on the error gets lost, leaving no way for consumer code to know about what caused the error.
It just outputs the following as a console warning:
...and the thrown error is an empty object, so it can't be evaluated:
try {
let { captchas } = await page.findRecaptchas();
if (!captchas.length) {
return;
}
await page.solveRecaptchas();
} catch (e) {
console.log(e) // <== cannot evaluate this error because it has no information
}
Describe the bug
Currently, when using the
puppeteer-extra-plugin-recaptcha
package withthrowOnError
set totrue
and aPuppeteerExtraPluginRecaptcha
error is thrown here, the argument passed toError
is an object. So the information on the error gets lost, leaving no way for consumer code to know about what caused the error.It just outputs the following as a console warning:
...and the thrown error is an empty object, so it can't be evaluated: