Skip to content

Commit

Permalink
attempt to fix login token invalid issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kinabalu committed Nov 24, 2024
1 parent f7f0aaa commit 54b4868
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,13 @@ ${formatTags(recording)}
}
} catch (error) {
console.error(error);
this.settings.token = undefined;
await this.saveSettings();
new Notice(`Login token was invalid, please try logging in again.`);
return;
if (error.hasOwnProperty('status') !== 'undefined') {
this.settings.token = undefined;
await this.saveSettings();
new Notice(`Login token was invalid, please try logging in again.`);
} else {
new Notice(`Error occurred syncing some notes to this vault.`)
}
}
}

Expand Down

0 comments on commit 54b4868

Please sign in to comment.