diff --git a/src/entries/background-script.js b/src/entries/background-script.js index 0759911b04..7e9b2c6b81 100644 --- a/src/entries/background-script.js +++ b/src/entries/background-script.js @@ -23,7 +23,6 @@ browser.alarms.onAlarm.addListener(alarm => { var accounts = d['accounts'] for (var accountId in accounts) { syncAccount(accountId) - .catch(err => console.warn(err)) } }) }) @@ -63,14 +62,14 @@ window.syncAccount = function(accountId) { return Promise.resolve() } syncing[accountId] = true - Account.get(accountId) + return Account.get(accountId) .then((account) => { return account.sync() }) .then(() => {delete syncing[accountId]}) - .catch((er) => { + .catch((error) => { delete syncing[accountId] - console.error(er) + console.error(error) }) .then(() => next[accountId] && next[accountId]()) } diff --git a/src/lib/Account.js b/src/lib/Account.js index 304264d016..bd65143dc9 100644 --- a/src/lib/Account.js +++ b/src/lib/Account.js @@ -188,5 +188,8 @@ export default class Account { .then(() => { this.setData({...this.getData(), syncing: false}) }) + .catch((err) => { + return this.setData({...this.getData(), error: err.message, syncing: false}) + }) } } diff --git a/src/lib/adapters/.Nextcloud.js.swo b/src/lib/adapters/.Nextcloud.js.swo new file mode 100644 index 0000000000..445e96b36b Binary files /dev/null and b/src/lib/adapters/.Nextcloud.js.swo differ diff --git a/src/lib/adapters/Nextcloud.js b/src/lib/adapters/Nextcloud.js index 4afd291cab..0a30c12685 100644 --- a/src/lib/adapters/Nextcloud.js +++ b/src/lib/adapters/Nextcloud.js @@ -42,7 +42,20 @@ export default class NextcloudAdapter {