Skip to content

Commit

Permalink
Unable to Sign in - TypeError: t.contains is not a function (#3708) (#…
Browse files Browse the repository at this point in the history
…3756)

Part of #3692
  • Loading branch information
alexr00 authored Jul 25, 2022
1 parent 0259b30 commit 548816d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/github/credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import * as vscode from 'vscode';
import Logger from '../common/logger';
import * as PersistentState from '../common/persistentState';
import { ITelemetry } from '../common/telemetry';
import { formatError } from '../common/utils';
import { agent } from '../env/node/net';
import { OctokitCommon } from './common';
import { getEnterpriseUri, hasEnterpriseUri } from './utils';
Expand Down Expand Up @@ -263,8 +264,8 @@ export class CredentialStore implements vscode.Disposable {
const user = await github.octokit.users.getAuthenticated({});
github.currentUser = user.data;
} catch (e) {
if (e.contains('ETIMEDOUT')) {
Logger.appendLine(`Error setting the user ${e}.`, 'Authentication');
Logger.appendLine(`Error setting the user ${formatError(e)}.`, 'Authentication');
if (e.message && e.message.contains('ETIMEDOUT')) {
await this.recreate('GitHub Pull Requests and Issues has encountered a problem with your login. Check the "GitHub Pull Request" output for more details.');
return this.setCurrentUser(github);
} else {
Expand Down

0 comments on commit 548816d

Please sign in to comment.