Show error icon at startup if proxy check fails
If a proxy is required and we can't connect to S3, show the (sync) error icon. For SSL certificate errors, which are the most common cause of this, the panel includes a link to the SSL cert troubleshooting page.
This commit is contained in:
parent
0f19872a8d
commit
168bc78f1a
3 changed files with 20 additions and 4 deletions
|
@ -651,10 +651,13 @@ Zotero.HTTP = new function() {
|
|||
dontCache: true
|
||||
})
|
||||
.catch(function (e) {
|
||||
Components.utils.reportError(e);
|
||||
var msg = "Error connecting to proxy -- proxied requests may not work";
|
||||
Zotero.log(msg, 'error');
|
||||
Zotero.debug(msg, 1);
|
||||
// Show error icon at startup
|
||||
if (e instanceof Zotero.HTTP.SecurityException) {
|
||||
Zotero.proxyFailure = e;
|
||||
}
|
||||
Zotero.logError(e);
|
||||
let msg = "Error connecting to proxy -- proxied requests may not work";
|
||||
Zotero.logError(msg);
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -481,6 +481,18 @@ var ZoteroPane = new function()
|
|||
Zotero.Prefs.set(pref, true);
|
||||
}
|
||||
|
||||
if (Zotero.proxyFailure) {
|
||||
try {
|
||||
Zotero.proxyFailure.message += "\n\n"
|
||||
+ Zotero.getString('startupError.internetFunctionalityMayNotWork');
|
||||
Zotero.Sync.Runner.updateIcons(Zotero.proxyFailure);
|
||||
Zotero.proxyFailure = null;
|
||||
}
|
||||
catch (e) {
|
||||
Zotero.logError(e);
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-sync on pane open or if new account
|
||||
if (Zotero.Prefs.get('sync.autoSync') || Zotero.initAutoSync) {
|
||||
yield Zotero.proxyAuthComplete;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue