Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b921eb9

Browse files
committedAug 18, 2023
Avoid getting workspaces when not logged in
Otherwise you get some confusing ECONNREFUSED errors in the logs.
1 parent 3ab3aad commit b921eb9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/workspacesProvider.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export class WorkspaceProvider implements vscode.TreeDataProvider<vscode.TreeIte
1616
private agentMetadata: Record<WorkspaceAgent["id"], AgentMetadataEvent[]> = {}
1717

1818
constructor(private readonly getWorkspacesQuery: WorkspaceQuery, private readonly storage: Storage) {
19+
if (!storage.getURL()) {
20+
// Not logged in.
21+
return
22+
}
1923
getWorkspaces({ q: this.getWorkspacesQuery })
2024
.then((workspaces) => {
2125
const workspacesTreeItem: WorkspaceTreeItem[] = []

0 commit comments

Comments
 (0)
Please sign in to comment.