Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit 59f0e76

Browse files
committed
xhr error formatting
1 parent 23e92dc commit 59f0e76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/system-fetch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
fulfill(xhr.responseText);
3434
}
3535
function error() {
36-
reject(new Error('XHR error: status ' + xhr.status + ' "' + xhr.statusText + '": ' + url));
36+
reject(new Error('XHR error' + (xhr.status ? ' (' + xhr.status + (xhr.statusText ? ' ' + xhr.statusText : '') + ')' : '') + ' loading ' + url));
3737
}
3838

3939
xhr.onreadystatechange = function () {

0 commit comments

Comments
 (0)