diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js index 3392de2f0..61521ebf0 100644 --- a/chrome/content/zotero/xpcom/http.js +++ b/chrome/content/zotero/xpcom/http.js @@ -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)); }