Skip to content

Commit

Permalink
Don't show response text on HTTP error if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Apr 11, 2017
1 parent 5d6478e commit 747290b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chrome/content/zotero/xpcom/http.js
Expand Up @@ -252,8 +252,10 @@ Zotero.HTTP = new function() {
}
deferred.resolve(xmlhttp);
} else {
let msg = "HTTP " + method + " " + dispURL + " failed with status code " + xmlhttp.status
+ ":\n\n" + xmlhttp.responseText;
let msg = "HTTP " + method + " " + dispURL + " failed with status code " + xmlhttp.status;
if (xmlhttp.responseText) {
msg += ":\n\n" + xmlhttp.responseText;
}
Zotero.debug(msg, 1);
deferred.reject(new Zotero.HTTP.UnexpectedStatusException(xmlhttp, msg));
}
Expand Down

0 comments on commit 747290b

Please sign in to comment.