Display connection error when linking sync account
This commit is contained in:
parent
b60fdacd3f
commit
5b5da4140b
|
@ -130,9 +130,23 @@ Zotero_Preferences.Sync = {
|
||||||
|
|
||||||
// Try to acquire API key with current credentials
|
// Try to acquire API key with current credentials
|
||||||
this.updateSyncIndicator('animated');
|
this.updateSyncIndicator('animated');
|
||||||
var json = yield Zotero.Sync.Runner.createAPIKeyFromCredentials(username, password);
|
try {
|
||||||
this.updateSyncIndicator();
|
var json = yield Zotero.Sync.Runner.createAPIKeyFromCredentials(username, password);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
setTimeout(function () {
|
||||||
|
Zotero.alert(
|
||||||
|
window,
|
||||||
|
Zotero.getString('general.error'),
|
||||||
|
e.message
|
||||||
|
);
|
||||||
|
});
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
this.updateSyncIndicator();
|
||||||
|
}
|
||||||
|
|
||||||
// Invalid credentials
|
// Invalid credentials
|
||||||
if (!json) {
|
if (!json) {
|
||||||
Zotero.alert(window,
|
Zotero.alert(window,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user