Auto-correct most (if not all) cases of "Unexpected status 404 in Zotero.Sync.Storage.Session.ZFS._getFileUploadParameters()"

This commit is contained in:
Dan Stillman 2010-02-13 09:45:29 +00:00
parent cabdd4977d
commit ca31a18159

View File

@ -533,6 +533,22 @@ Zotero.Sync.Storage.Session.ZFS.prototype._getFileUploadParameters = function (i
self.onError(e);
return;
}
else if (req.status == 404) {
Components.utils.reportError("Unexpected status code 404 in " + funcName
+ " (" + Zotero.Items.getLibraryKeyHash(item) + ")");
if (Zotero.Prefs.get('sync.debugNoAutoResetClient')) {
Components.utils.reportError("Skipping automatic client reset due to debug pref");
return;
}
if (!Zotero.Sync.Server.canAutoResetClient) {
Components.utils.reportError("Client has already been auto-reset -- manual sync required");
return;
}
Zotero.Sync.Server.resetClient();
Zotero.Sync.Server.canAutoResetClient = false;
self.onError();
return;
}
else if (req.status != 200) {
var msg = "Unexpected status code " + req.status + " in " + funcName
+ " (" + Zotero.Items.getLibraryKeyHash(item) + ")";