wavetermdev/waveterm · error
error listing workspaces: %w
Error message
error listing workspaces: %w
What it means
Returned when listing workspaces from the workspace store fails. The underlying error is wrapped with %w.
Source
Thrown at pkg/wshrpc/wshserver/wshserver.go:950
return nil, err
}
results = append(results, wshrpc.BlocksListEntry{
WindowId: windowId,
WorkspaceId: wsID,
TabId: tabID,
BlockId: blkID,
Meta: blk.Meta,
})
}
}
}
return results, nil
}
func (ws *WshServer) WorkspaceListCommand(ctx context.Context) ([]wshrpc.WorkspaceInfoData, error) {
workspaceList, err := wcore.ListWorkspaces(ctx)
if err != nil {
return nil, fmt.Errorf("error listing workspaces: %w", err)
}
var rtn []wshrpc.WorkspaceInfoData
for _, workspaceEntry := range workspaceList {
workspaceData, err := wcore.GetWorkspace(ctx, workspaceEntry.WorkspaceId)
if err != nil {
return nil, fmt.Errorf("error getting workspace: %w", err)
}
rtn = append(rtn, wshrpc.WorkspaceInfoData{
WindowId: workspaceEntry.WindowId,
WorkspaceData: workspaceData,
})
}
return rtn, nil
}
func (ws *WshServer) ListAllAppsCommand(ctx context.Context) ([]wshrpc.AppInfo, error) {
return waveappstore.ListAllApps()
}View on GitHub (pinned to a4447c1563)
Solutions
- Inspect the wrapped underlying error for the root cause
- Verify wstore DB integrity (check the wave database file is readable and not corrupted)
- Retry after fixing any transient storage issues
Defensive patterns
Strategy: try-catch
Try / catch
workspaces, err := client.WorkspaceListCommand(ctx)
if err != nil {
if strings.Contains(err.Error(), "error listing workspaces") {
errors.As(err, &inner) // inspect underlying wstore failure
}
return err
} Prevention
- Keep the wave DB healthy and backed up
- Watch for storage errors at startup
- Use errors.As to unwrap the root cause
When it happens
Trigger: wcore.ListWorkspaces fails — e.g. errors reading workspace entries from wstore DB or corrupt workspace records.
Common situations: Database (wstore) read failures; corrupted or partially migrated workspace entries; internal state errors during startup.
Related errors
- error getting workspace: %w
- update wavobj is nil
- object not found: %s
- error updating object: %w
- error parsing command map: %w
AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01).
Data as JSON: /api/errors/521a92827eefab66.
Report an issue: GitHub.