Obsolete
Status Update
Comments
bu...@chromium.org <bu...@chromium.org> #2
[Empty comment from Monorail migration]
bu...@chromium.org <bu...@chromium.org> #3
[Empty comment from Monorail migration]
[Deleted User] <[Deleted User]> #4
The error event thrown is a progress event 'error' ( https://dvcs.w3.org/hg/progress/raw-file/tip/Overview.html ), which doesn't disseminate much about the nature of the network error.
Hence the implementation isn't wrong to behave this way. Convincing the XMLHttpRequest spec to change by exposing more information upon network errors, seems like the best next step here. There might be information leakage concerns.
(Not sure if it is intended, but the error event listener is invoked, but as responseText will be the empty string nothing appears output.)
Hence the implementation isn't wrong to behave this way. Convincing the XMLHttpRequest spec to change by exposing more information upon network errors, seems like the best next step here. There might be information leakage concerns.
(Not sure if it is intended, but the error event listener is invoked, but as responseText will be the empty string nothing appears output.)
cb...@chromium.org <cb...@chromium.org> #5
[Empty comment from Monorail migration]
hi...@chromium.org <hi...@chromium.org> #6
The details of errors of XHRs and Fetch API are not exposed to JavaScript for security reasons.
For example,https://crbug.com/chromium/451288 changed the error messages of Fetch API from more descriptive one to just "Failed to fetch".
Thus closing this issue as WontFix.
For example,
Thus closing this issue as WontFix.
tk...@chromium.org <tk...@chromium.org> #7
[Empty comment from Monorail migration]
no...@gmail.com <no...@gmail.com> #8
is...@google.com <is...@google.com> #9
This issue was migrated from crbug.com/chromium/118096?no_tracker_redirect=1
[Monorail components added to Component Tags custom field.]
[Monorail components added to Component Tags custom field.]
Description
<head>
<script>
window.addEventListener('load', function() {
// WORKS var url = '
var url = '
var xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
function resolve(event) {
document.querySelector('.data').innerHTML = event.currentTarget.responseText;
}
function reject(event) {
document.querySelector('.err').innerHTML = event.currentTarget.responseText;
}
xhr.addEventListener('error', reject, false);
xhr.addEventListener('abort', reject, false);
xhr.addEventListener('load', resolve, false);
xhr.onerror = reject;
xhr.onabort = reject;
xhr.withCredentials = true;
xhr.onreadystatechange = function(event) {
console.log("onreadystatechange ", arguments);
};
xhr.send();
});
</script>
</head>
<body>
<p>
When we issue an XHR to a CORS enabled site, we can get errors.
In Chrome Version 19.0.1061.1 dev these errors come out in the console.
Thus developers have no way to tell users about the problem.
</p>
<p>Expected: An error message. Actual: Nothing</p>
<h2>Here is where our data will go:</h2>
<div class='data'></div>
<h2>Here is where our error message will go:</h2>
<div class='err'></div>
</body>
</html>