diff --git a/chrome/content/zotero/xpcom/sync/syncEngine.js b/chrome/content/zotero/xpcom/sync/syncEngine.js index f23082f81..0fbbcf938 100644 --- a/chrome/content/zotero/xpcom/sync/syncEngine.js +++ b/chrome/content/zotero/xpcom/sync/syncEngine.js @@ -906,10 +906,11 @@ Zotero.Sync.Data.Engine.prototype._uploadObjects = Zotero.Promise.coroutine(func // Handle failed objects for (let index in json.results.failed) { let { code, message } = json.results.failed[index]; - e = new Error(message); + let e = new Error(message); e.name = "ZoteroUploadObjectError"; e.code = code; - Zotero.logError(e); + Zotero.logError("Error for " + objectType + " " + batch[index].key + " in " + + this.library.name + ":\n\n" + e); // This shouldn't happen, because the upload request includes a library // version and should prevent an outdated upload before the object version is diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js index 8434f6885..018435b35 100644 --- a/chrome/content/zotero/xpcom/sync/syncRunner.js +++ b/chrome/content/zotero/xpcom/sync/syncRunner.js @@ -1088,7 +1088,7 @@ Zotero.Sync.Runner_Module = function (options = {}) { // For unexpected ones, just show a generic message else { // TODO: improve and localize - var msg = "An error occurred during syncing:\n\n" + e; + var msg = "An error occurred during syncing:\n\n" + e.message; } var desc = doc.createElement('description');