Skip to content

Commit

Permalink
when mfa is enabled application record is deleted, so it returns a 404
Browse files Browse the repository at this point in the history
  • Loading branch information
pedr committed Jun 30, 2024
1 parent dba4c93 commit f2e0429
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/lib/SyncTargetJoplinCloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/Synchronizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit f2e0429

Please sign in to comment.