More accurate error message on server error (instead of "Empty response from server")
This commit is contained in:
parent
d69fde6731
commit
6f4414ed4d
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue