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;
}
}