Skip to content

Commit

Permalink
fix(db/isogit): report Authorization Error
Browse files Browse the repository at this point in the history
caused e.g. when PAT is required instead of a password per
glossarist/glossarist-desktop#143
  • Loading branch information
strogonoff committed Sep 18, 2020
1 parent a9690d8 commit d294ccb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/db/isogit-yaml/main/isogit/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,8 @@ export class IsoGitWrapper {
log.warn("Possible connection issues");
} else if (
e.code === 'MissingPasswordTokenError'
|| (e.code === 'HTTPError' && e.message.indexOf('Unauthorized') >= 0)) {
|| (e.code === 'HTTPError' && e.message.indexOf('Unauthorized') >= 0)
|| e.message.indexOf('Authorization Required')) {
log.warn("Password input required");
await this.setPassword(undefined);
}
Expand Down

0 comments on commit d294ccb

Please sign in to comment.