diff --git a/CHANGELOG.md b/CHANGELOG.md index 9454194..0a749b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,10 +24,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p - Holding the `ctrl` key with a commit row selected will highlight rows for that commit's branch ### Changed + - In the _Commit Graph_, increases the time to highlight associated rows when hovering over a branch to 1s ### Fixed +- Fixes [#2318](https://github.com/gitkraken/vscode-gitlens/issues/2318) - GitLens need to login again after VS Code insiders upgrade every day - Fixes [#2377](https://github.com/gitkraken/vscode-gitlens/issues/2377) - Missing Azure Devops Icon - Fixes [#2380](https://github.com/gitkraken/vscode-gitlens/issues/2380) - Autolink fails with curly braces - Fixes [#2381](https://github.com/gitkraken/vscode-gitlens/issues/2381) - can't use scrollbar in 'Commit Graph' view diff --git a/src/plus/subscription/subscriptionService.ts b/src/plus/subscription/subscriptionService.ts index 8cde3d7..62ad6dd 100644 --- a/src/plus/subscription/subscriptionService.ts +++ b/src/plus/subscription/subscriptionService.ts @@ -754,16 +754,29 @@ export class SubscriptionService implements Disposable { Logger.error(ex, scope); debugger; + this.container.telemetry.sendEvent('account/validation/failed', { + 'account.id': session.account.id, + exception: String(ex), + code: ex.original?.code, + statusCode: ex.statusCode, + }); + + Logger.debug(scope, `Account validation failed (${ex.statusCode ?? ex.original?.code})`); + if (ex instanceof AccountValidationError) { const name = session.account.label; + // if ( + // (ex.statusCode != null && ex.statusCode < 500) || + // (ex.statusCode == null && (ex.original as any)?.code !== 'ENOTFOUND') + // ) { if ( - (ex.statusCode != null && ex.statusCode < 500) || - (ex.statusCode == null && (ex.original as any)?.code !== 'ENOTFOUND') + (ex.original as any)?.code !== 'ENOTFOUND' && + ex.statusCode != null && + ex.statusCode < 500 && + ex.statusCode >= 400 ) { session = null; - - Logger.debug(scope, `Account validation failed (${ex.statusCode ?? (ex.original as any)?.code})`); await this.logoutCore(); if (createIfNeeded) { @@ -785,12 +798,12 @@ export class SubscriptionService implements Disposable { } else { session = session ?? null; - if ((ex.original as any)?.code !== 'ENOTFOUND') { - void window.showErrorMessage( - `Unable to sign in to your (${name}) GitLens+ account right now. Please try again in a few minutes. If this issue persists, please contact support. Error=${ex.message}`, - 'OK', - ); - } + // if ((ex.original as any)?.code !== 'ENOTFOUND') { + // void window.showErrorMessage( + // `Unable to sign in to your (${name}) GitLens+ account right now. Please try again in a few minutes. If this issue persists, please contact support. Error=${ex.message}`, + // 'OK', + // ); + // } } } }