diff --git a/packages/lib/SyncTargetJoplinCloud.ts b/packages/lib/SyncTargetJoplinCloud.ts index 1b40ec7bddc..a4dd4be17c5 100644 --- a/packages/lib/SyncTargetJoplinCloud.ts +++ b/packages/lib/SyncTargetJoplinCloud.ts @@ -56,7 +56,7 @@ export default class SyncTargetJoplinCloud extends BaseSyncTarget { const sessionId = await api.sessionId(); return !!sessionId; } catch (error) { - if (error.code === 403) { + if ([403, 404].includes(error.code)) { return false; } throw error; diff --git a/packages/lib/Synchronizer.ts b/packages/lib/Synchronizer.ts index 56b98baa0b0..d8650fdad01 100644 --- a/packages/lib/Synchronizer.ts +++ b/packages/lib/Synchronizer.ts @@ -524,7 +524,7 @@ export default class Synchronizer { // await uploadSyncInfo(this.api(), remoteInfo); } } catch (error) { - if (error.code === 403) { + if ([403, 404].includes(error.code)) { this.dispatch({ type: 'MUST_AUTHENTICATE', value: true }); } if (error.code === 'outdatedSyncTarget') {