Fix error handling for HTTP.request() with responseType: 'document'
This commit is contained in:
parent
9202ab8b3c
commit
0df967418b
|
@ -253,7 +253,7 @@ Zotero.HTTP = new function() {
|
||||||
deferred.resolve(xmlhttp);
|
deferred.resolve(xmlhttp);
|
||||||
} else {
|
} else {
|
||||||
let msg = "HTTP " + method + " " + dispURL + " failed with status code " + xmlhttp.status;
|
let msg = "HTTP " + method + " " + dispURL + " failed with status code " + xmlhttp.status;
|
||||||
if (xmlhttp.responseText) {
|
if (!xmlhttp.responseType && xmlhttp.responseText) {
|
||||||
msg += ":\n\n" + xmlhttp.responseText;
|
msg += ":\n\n" + xmlhttp.responseText;
|
||||||
}
|
}
|
||||||
Zotero.debug(msg, 1);
|
Zotero.debug(msg, 1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user