From e9afd153e9a368e71a29f22982578750e6983ae9 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 14 Oct 2020 19:28:04 -0400 Subject: [PATCH] Log HTTP error bodies when responseType is explicitly set to 'text' Previously they were only logged if responseType wasn't set --- chrome/content/zotero/xpcom/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js index d70167cc7e..3530ca0882 100644 --- a/chrome/content/zotero/xpcom/http.js +++ b/chrome/content/zotero/xpcom/http.js @@ -504,7 +504,7 @@ Zotero.HTTP = new function() { deferred.resolve(xmlhttp); } else { let msg = "HTTP " + method + " " + dispURL + " failed with status code " + status; - if (!xmlhttp.responseType && xmlhttp.responseText) { + if ((!xmlhttp.responseType || xmlhttp.responseType == 'text') && xmlhttp.responseText) { msg += ":\n\n" + xmlhttp.responseText; } Zotero.debug(msg, 1);