Skip to content

Commit 99b34d2

Browse files
authored
fix(vscode): small typing inconsistency (#4216)
1 parent 7d2363d commit 99b34d2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

vscode/extension/src/auth/auth.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ export class AuthenticationProviderTobikoCloud
9797
return []
9898
}
9999
const token = statusResponse.id_token
100+
if (!token) {
101+
throw new Error("Invalid state from tcloud, failed to get token.")
102+
}
100103
const session = {
101104
id: token.email,
102105
account: {
@@ -120,6 +123,9 @@ export class AuthenticationProviderTobikoCloud
120123
throw new Error("Failed to login to tcloud")
121124
}
122125
const token = statusResponse.id_token
126+
if (!token) {
127+
throw new Error("Failed to get tcloud token")
128+
}
123129
const session: AuthenticationSession = {
124130
id: token.email,
125131
account: {

0 commit comments

Comments
 (0)