commit a64c6808e5208865a3d7f53c2f3b5ba4d914c027 parent 3df66ccbe47692c3250401af2ed2794d40e726c6 Author: Dan Stillman <dstillman@zotero.org> Date: Fri, 7 Apr 2017 22:34:19 -0400 Always include server response in Zotero.HTTP.request() errors Diffstat:
| M | chrome/content/zotero/xpcom/http.js | | | 6 | ++---- |
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js @@ -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)); }