commit 97f38546626378ac5255a2e15db78f4b66ab72f2 parent 716ba660321baa0887439f440969584fbfea8e65 Author: Dan Stillman <dstillman@zotero.org> Date: Tue, 19 Apr 2016 05:21:45 -0400 Include 400 response in logged sync errors Diffstat:
| M | chrome/content/zotero/xpcom/http.js | | | 7 | ++++--- |
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js @@ -252,10 +252,11 @@ Zotero.HTTP = new function() { } deferred.resolve(xmlhttp); } else { - var msg = "HTTP " + method + " " + dispURL + " failed: " - + "Unexpected status code " + xmlhttp.status; + let msg = "HTTP " + method + " " + dispURL + " failed with status code " + xmlhttp.status; + if (xmlhttp.status == 400 || options.debug) { + msg += ":\n\n" + xmlhttp.responseText; + } Zotero.debug(msg, 1); - Zotero.debug(xmlhttp.responseText, 1); deferred.reject(new Zotero.HTTP.UnexpectedStatusException(xmlhttp, msg)); } };