From d294ccbfc55312128371c10b323bd63762493b06 Mon Sep 17 00:00:00 2001 From: Anton Strogonoff Date: Sat, 19 Sep 2020 03:16:31 +0900 Subject: [PATCH] fix(db/isogit): report Authorization Error caused e.g. when PAT is required instead of a password per https://github.com/glossarist/glossarist-desktop/issues/143 --- src/db/isogit-yaml/main/isogit/base.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/db/isogit-yaml/main/isogit/base.ts b/src/db/isogit-yaml/main/isogit/base.ts index 1869892..0995d24 100644 --- a/src/db/isogit-yaml/main/isogit/base.ts +++ b/src/db/isogit-yaml/main/isogit/base.ts @@ -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); }