File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -180,15 +180,23 @@ export class CredentialStore extends Disposable {
180180 github = await this . createHub ( session . accessToken , authProviderId ) ;
181181 } catch ( e ) {
182182 if ( ( e . message === 'Bad credentials' ) && ! getAuthSessionOptions . forceNewSession ) {
183+ Logger . debug ( `Creating hub failed ${ e . message } ` , CredentialStore . ID ) ;
183184 getAuthSessionOptions . forceNewSession = true ;
184185 getAuthSessionOptions . silent = false ;
185186 return this . initialize ( authProviderId , getAuthSessionOptions , scopes , requireScopes ) ;
187+ } else {
188+ // console.log because we need to see if we can learn more from the error object.
189+ console . log ( e ) ;
190+ Logger . error ( `Creating hub failed ${ e . message } ` , CredentialStore . ID ) ;
191+ vscode . window . showErrorMessage ( vscode . l10n . t ( 'Unable to sign in with the provided credentials' ) ) ;
186192 }
187193 }
188194 if ( ! isEnterprise ( authProviderId ) ) {
195+ Logger . debug ( 'Setting hub and scopes' , CredentialStore . ID ) ;
189196 this . _githubAPI = github ;
190197 this . _scopes = usedScopes ;
191198 } else {
199+ Logger . debug ( 'Setting enterprise hub and scopes' , CredentialStore . ID ) ;
192200 this . _githubEnterpriseAPI = github ;
193201 this . _scopesEnterprise = usedScopes ;
194202 }
You can’t perform that action at this time.
0 commit comments