Skip to content
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

CORS Errors do not fail gracefully #133

Open
Slowlearneruk opened this issue Mar 31, 2017 · 0 comments
Open

CORS Errors do not fail gracefully #133

Slowlearneruk opened this issue Mar 31, 2017 · 0 comments

Comments

@Slowlearneruk
Copy link

If the request falls outside of the content security policy then we get an unhandled exception thrown at:

xhr.open('GET',`` url, true);

I was able to get a more graceful response by replacing it with:

try {
xhr.open('GET', url, true);
} catch(cException) {
if (errback) {
errback(cException);
return;
}
}

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

No branches or pull requests

1 participant