Skip to content

Commit d52e00f

Browse files
authored
fix: ssoSetup() failure not logged #3695
Problem: getLogger() is called in module-scope, which means it may initialize to a "console logger" if the main logger is not ready yet, depending on module load order. Solution: Don't call getLogger() in module-scope.
1 parent f933177 commit d52e00f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/auth/ui/vue/show.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import { trustedDomainCancellation } from '../../sso/model'
4444
import { FeatureId, CredentialSourceId, Result, telemetry } from '../../../shared/telemetry/telemetry'
4545
import { AuthFormId, isBuilderIdAuth } from './authForms/types'
4646

47-
const logger = getLogger()
4847
export class AuthWebview extends VueWebview {
4948
public override id: string = 'authWebview'
5049
public override source: string = 'src/auth/ui/vue/index.js'
@@ -238,7 +237,7 @@ export class AuthWebview extends VueWebview {
238237
return { id: 'badStartUrl', text: `Connection failed. Please verify your start URL.` }
239238
}
240239

241-
logger.error('Failed to setup.', e)
240+
getLogger().error('AuthWebview: Failed to setup: %s', (e as Error).message)
242241
return { id: 'defaultFailure', text: 'Failed to setup.' }
243242
}
244243
}

0 commit comments

Comments
 (0)