Skip to content

Commit 90cd802

Browse files
committed
Address comments
1 parent 6cb410d commit 90cd802

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/amazonq/src/lsp/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export async function startLanguageServer(
184184
try {
185185
await AuthUtil.instance.migrateSsoConnectionToLsp(clientName)
186186
} catch (e) {
187-
client.error(`Error while migration SSO connection to Amazon Q LSP: ${e}`)
187+
getLogger().error(`Error while migration SSO connection to Amazon Q LSP: ${e}`)
188188
}
189189

190190
// Request handler for when the server wants to know about the clients auth connnection. Must be registered before the initial auth init call

packages/core/src/codewhisperer/util/authUtil.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,10 @@ export class AuthUtil implements IAuthProvider {
357357
let toImport: SsoProfile | undefined
358358
let profileId: string | undefined
359359

360-
getLogger().info(`codewhisperer: checking for old SSO connections`)
361-
if (profiles) {
360+
if (!profiles) {
361+
return
362+
} else {
363+
getLogger().info(`codewhisperer: checking for old SSO connections`)
362364
for (const [id, p] of Object.entries(profiles)) {
363365
if (p.type === 'sso' && hasExactScopes(p.scopes ?? [], amazonQScopes)) {
364366
toImport = p

0 commit comments

Comments
 (0)