Always include server response in Zotero.HTTP.request() errors
This commit is contained in:
parent
3df66ccbe4
commit
a64c6808e5
1 changed files with 2 additions and 4 deletions
|
@ -252,10 +252,8 @@ Zotero.HTTP = new function() {
|
|||
}
|
||||
deferred.resolve(xmlhttp);
|
||||
} else {
|
||||
let msg = "HTTP " + method + " " + dispURL + " failed with status code " + xmlhttp.status;
|
||||
if (xmlhttp.status == 400 || options.debug) {
|
||||
msg += ":\n\n" + xmlhttp.responseText;
|
||||
}
|
||||
let msg = "HTTP " + method + " " + dispURL + " failed with status code " + xmlhttp.status
|
||||
+ ":\n\n" + xmlhttp.responseText;
|
||||
Zotero.debug(msg, 1);
|
||||
deferred.reject(new Zotero.HTTP.UnexpectedStatusException(xmlhttp, msg));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue