File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -402,8 +402,13 @@ export class CredentialStore extends Disposable {
402402
403403 private setCurrentUser ( github : GitHub ) : void {
404404 const getUser : ReturnType < typeof github . octokit . api . users . getAuthenticated > = new Promise ( resolve => {
405+ Logger . debug ( 'Getting current user' , CredentialStore . ID ) ;
405406 github . octokit . call ( github . octokit . api . users . getAuthenticated , { } ) . then ( result => {
407+ Logger . debug ( `Got current user ${ result . data . login } ` , CredentialStore . ID ) ;
406408 resolve ( result ) ;
409+ } ) . catch ( e => {
410+ vscode . window . showErrorMessage ( vscode . l10n . t ( 'Unable to get the currently logged in user, GitHub Pull Requests will not work correctly' ) ) ;
411+ Logger . error ( `Failed to get current user: ${ e } , ${ e . message } ` , CredentialStore . ID ) ;
407412 } ) ;
408413 } ) ;
409414 github . currentUser = new Promise ( resolve => {
You can’t perform that action at this time.
0 commit comments