Except when an error might occur due to, for example, a timeout (slow connection). In this case, the Promise code above does not handle the exception and the browser gives an error like:
Uncaught (in promise) Timeout
Promise.then (async)
How would I handle exceptions in the Promise (auto-generated by your package)?
For example:
...., {action: 'homepage'})
.then(recaptchaReady)
.catch((err) => {
// Handle any error that occurred in any of the previous
// promises in the chain.
});
@1Map thanks for using this package!
AFAIK, I'm not using any promise in this package, and none are auto-generated.
I suggest you, to take a look at the example folder to see how to implement it.
Hi, I am using your package and what I can see is that it injects the recaptcha code on the web page (which works wonderful), example:
Except when an error might occur due to, for example, a timeout (slow connection). In this case, the Promise code above does not handle the exception and the browser gives an error like:
How would I handle exceptions in the Promise (auto-generated by your package)?
For example: