From 6e42b0d47e4a6cffc6a3b23b362563f3bd2e6a73 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Sun, 19 May 2024 21:22:06 +0200 Subject: [PATCH] fix(Account): call onSyncFail if onSyncStart fails Signed-off-by: Marcel Klehr --- src/lib/Account.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/Account.ts b/src/lib/Account.ts index dbaddd67d0..3fc0bdd6f8 100644 --- a/src/lib/Account.ts +++ b/src/lib/Account.ts @@ -165,8 +165,15 @@ export default class Account { try { status = await this.server.onSyncStart(needLock) } catch (e) { + await this.server.onSyncFail() // Resource locked if (e.code === 37) { + Sentry.setContext('accountData', { + ...this.getData(), + username: 'SENSITIVEVALUEHIDDEN', + password: 'SENSITIVEVALUVALUEHIDDEN', + passphrase: 'SENSITIVEVALUVALUEHIDDEN' + }) Sentry.captureException(e) // We got a resource locked error if (this.getData().lastSync < Date.now() - LOCK_TIMEOUT) {