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

  1. Inspect the wrapped underlying error for the root cause
  2. Verify wstore DB integrity (check the wave database file is readable and not corrupted)
  3. 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

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


AI-assisted analysis of wavetermdev/waveterm@a4447c1563 (2026-09-01). Data as JSON: /api/errors/521a92827eefab66. Report an issue: GitHub.