commit 6f4414ed4d72662355f15a0f51e343941d34ec82
parent d69fde67310f7b903f85a365d97dd209de669e86
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 29 Oct 2008 19:01:32 +0000
More accurate error message on server error (instead of "Empty response from server")
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js
@@ -1151,11 +1151,11 @@ Zotero.Sync.Server = new function () {
function _checkResponse(xmlhttp) {
- if (!xmlhttp.responseXML) {
+ if (!xmlhttp.responseText) {
_error('Empty response from server');
}
- if ( !xmlhttp.responseXML.childNodes[0] ||
+ if (!xmlhttp.responseXML || !xmlhttp.responseXML.childNodes[0] ||
xmlhttp.responseXML.childNodes[0].tagName != 'response') {
Zotero.debug(xmlhttp.responseText);
_error('Invalid response from server', xmlhttp.responseText);