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

Commit fdb52e8

Browse files
committed
Merge pull request #421 from msegado/patch-1
Fix confusing error when XHR statusText is blank
2 parents 64a5d70 + 8b4dd47 commit fdb52e8

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.statusText + ': ' + url || 'XHR error'));
36+
reject(new Error('XHR error: status ' + xhr.status + ' "' + xhr.statusText + '": ' + url));
3737
}
3838

3939
xhr.onreadystatechange = function () {

0 commit comments

Comments
 (0)