www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 64414e49be29b5ecba22b53def158d2508b21de6
parent a64c6808e5208865a3d7f53c2f3b5ba4d914c027
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri,  7 Apr 2017 22:45:16 -0400

Show UnexpectedStatusException response without prefix during sync

Diffstat:
Mchrome/content/zotero/xpcom/sync/syncRunner.js | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js @@ -566,7 +566,7 @@ Zotero.Sync.Runner_Module = function (options = {}) { throw e; } - Zotero.debug("Sync failed for library " + libraryID); + Zotero.debug("Sync failed for library " + libraryID, 1); Zotero.logError(e); this.checkError(e); options.onError(e); @@ -1217,8 +1217,13 @@ 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.message; + if (e instanceof Zotero.HTTP.UnexpectedStatusException) { + msg = Zotero.Utilities.ellipsize(e.xmlhttp.responseText, 1000, true); + } + else { + // TODO: Localize + var msg = "An error occurred during syncing:\n\n" + e.message; + } } var desc = doc.createElement('description');