Skip to content

Make script init error catchable #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 19, 2020
Merged

Conversation

owenandrews
Copy link
Contributor

Currently if the Recaptcha scripts fails to load (network failure, etc) an exception is thrown. However, because it is thrown inside an event callback it cannot be caught further up the stack. This pull request moves the callback to within the _ready promise where it can be rejected if the error callback is triggered. This can then easily be caught and an error displayed to the user.

@mvrlin mvrlin merged commit a3119bf into nuxt-community:master Oct 19, 2020
@farnabaz farnabaz mentioned this pull request Feb 1, 2021
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants