Skip to content

Commit

Permalink
All: Improved handling of expired sessions when using Joplin Server
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Oct 25, 2021
1 parent b497177 commit ace1118
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/lib/JoplinServerApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ export default class JoplinServerApi {
logger.warn(this.requestToCurl_(url, fetchOptions));
logger.warn(error);
}

if (error.code === 403) {
this.session_ = null;
error.message = 'Session has expired or is invalid, please try again.';
}

throw error;
}
}
Expand Down

0 comments on commit ace1118

Please sign in to comment.