From 1d43d274ac06b66fe5eb6922a09f40f122ba5de2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 31 Dec 2009 00:19:31 +0000 Subject: [PATCH] Don't automatically retry sync for 400 errors (now) sent from the server --- chrome/content/zotero/xpcom/sync.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js index 32b8a978c8..dfaa949518 100644 --- a/chrome/content/zotero/xpcom/sync.js +++ b/chrome/content/zotero/xpcom/sync.js @@ -1700,6 +1700,15 @@ Zotero.Sync.Server = new function () { } if (firstChild.localName == 'error') { + // Don't automatically retry 400 errors + if (xmlhttp.status >= 400 && xmlhttp.status < 500) { + Zotero.debug("Server returned " + xmlhttp.status + " -- manual sync required", 2); + Zotero.Sync.Server.manualSyncRequired = true; + } + else { + Zotero.debug("Server returned " + xmlhttp.status, 3); + } + switch (firstChild.getAttribute('code')) { case 'INVALID_UPLOAD_DATA': // On the off-chance that this error is due to invalid characters