Skip to content

Commit 9868091

Browse files
committed
fix: try/catch for fetching the session token
1 parent 8086c7b commit 9868091

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/storage.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,13 @@ export class Storage {
5252
}
5353

5454
public async getSessionToken(): Promise<string | undefined> {
55-
return this.secrets.get("sessionToken")
55+
try {
56+
return await this.secrets.get("sessionToken")
57+
} catch (ex) {
58+
// The VS Code session store has become corrupt before, and
59+
// will fail to get the session token...
60+
return undefined
61+
}
5662
}
5763

5864
// getRemoteSSHLogPath returns the log path for the "Remote - SSH" output panel.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy