diff --git a/packages/core/src/codewhisperer/util/authUtil.ts b/packages/core/src/codewhisperer/util/authUtil.ts index 2f8843d754b..10acbe16424 100644 --- a/packages/core/src/codewhisperer/util/authUtil.ts +++ b/packages/core/src/codewhisperer/util/authUtil.ts @@ -143,9 +143,8 @@ export class AuthUtil { if (!this.isConnected()) { await this.regionProfileManager.invalidateProfile(this.regionProfileManager.activeRegionProfile?.arn) + await this.regionProfileManager.clearCache() } - - await this.regionProfileManager.clearCache() }) this.regionProfileManager.onDidChangeRegionProfile(async () => {