Skip to content

Commit b921eb9

Browse files
committed
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

+4
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)