www

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

commit a2fbf046824ab4c8a2f7017f31b7c31d0e19b017
parent 19714d5b9bdba12ba90d1800f72f9f3125163228
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sun,  5 Jun 2016 19:06:00 -0400

Fix handling of unexpected status code for repository update request

Diffstat:
Mchrome/content/zotero/xpcom/schema.js | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -1052,15 +1052,16 @@ Zotero.Schema = new function(){ return _updateFromRepositoryCallback(xmlhttp, !!force); } catch (e) { - if (e instanceof Zotero.HTTP.BrowserOfflineException || e.xmlhttp) { + if (e instanceof Zotero.HTTP.UnexpectedStatusException + || e instanceof Zotero.HTTP.BrowserOfflineException) { let msg = " -- retrying in " + ZOTERO_CONFIG.REPOSITORY_RETRY_INTERVAL if (e instanceof Zotero.HTTP.BrowserOfflineException) { Zotero.debug("Browser is offline" + msg, 2); } else { - Components.utils.reportError(e); - Zotero.debug(xmlhttp.status, 1); - Zotero.debug(xmlhttp.responseText, 1); + Zotero.logError(e); + Zotero.debug(e.status, 1); + Zotero.debug(e.xmlhttp.responseText, 1); Zotero.debug("Error updating from repository " + msg, 1); } // TODO: instead, add an observer to start and stop timer on online state change