-
Notifications
You must be signed in to change notification settings - Fork 28.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Log a lot more of the Microsoft Auth extension #192629
Conversation
This PR adds a ton more logging, a consistant format, and fixes the log levels of some. Additionally, there are two small fixes that I have included: * we were firing the `_sessionChangeEmitter` twice when a session was removed * when processing updates from other windows, we returned instead of continued... thus were only processing the first account that was added in another window
return Promise.resolve(undefined); | ||
} | ||
|
||
const token = this._tokens.splice(tokenIndex, 1)[0]; | ||
const session = await this.removeSessionByIToken(token, writeToDisk); | ||
|
||
if (session) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bullet point 1
} | ||
|
||
private async checkForUpdates(e: IDidChangeInOtherWindowEvent<IStoredSession>): Promise<void> { | ||
for (const key of e.added) { | ||
const session = await this._tokenStorage.get(key); | ||
if (!session) { | ||
this._logger.error('session not found that was apparently just added'); | ||
return; | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bullet point 2
} catch (e) { | ||
// Network failures will automatically retry on next poll. | ||
if (e.message !== REFRESH_NETWORK_FAILURE) { | ||
vscode.window.showErrorMessage(vscode.l10n.t('You have been signed out because reading stored authentication information failed.')); | ||
await this.removeSessionById(session.id); | ||
} | ||
return; | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bullet point 2
This PR adds a ton more logging, a consistant format, and fixes the log levels of some.
Additionally, there are two small fixes that I have included:
_sessionChangeEmitter
twice when a session was removedref #186693