multica-ai/multica · error

list runtimes: %w

Error message

list runtimes: %w

What it means

runRuntimeList wraps a failure of client.GetJSON against GET /api/runtimes. As with error 640, the wrapped cause is one of: transport failure, non-2xx status (auth, permission), or a decode failure on the []map[string]any payload. Because the target type is a generic map slice, decode failures are unlikely — most real causes are connectivity or auth.

Source

Thrown at server/cmd/multica/cmd_runtime.go:118

	runtimeDeleteCmd.Flags().String("output", "table", "Output format: table or json")
}

// ---------------------------------------------------------------------------
// Runtime commands
// ---------------------------------------------------------------------------

func runRuntimeList(cmd *cobra.Command, _ []string) error {
	client, err := newAPIClient(cmd)
	if err != nil {
		return err
	}

	ctx, cancel := cli.APIContext(context.Background())
	defer cancel()

	var runtimes []map[string]any
	if err := client.GetJSON(ctx, "/api/runtimes", &runtimes); err != nil {
		return fmt.Errorf("list runtimes: %w", err)
	}

	output, _ := cmd.Flags().GetString("output")
	if output == "json" {
		return cli.PrintJSON(os.Stdout, runtimes)
	}

	headers := []string{"ID", "NAME", "MODE", "PROVIDER", "STATUS", "LAST_SEEN"}
	rows := make([][]string, 0, len(runtimes))
	for _, rt := range runtimes {
		rows = append(rows, []string{
			strVal(rt, "id"),
			strVal(rt, "name"),
			strVal(rt, "runtime_mode"),
			strVal(rt, "provider"),
			strVal(rt, "status"),
			strVal(rt, "last_seen_at"),
		})

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Verify server reachability and auth (same checks as error 640: base URL, re-login).
  2. Confirm the deployed server version exposes /api/runtimes (curl it directly); upgrade server or CLI to match.
  3. If a proxy sits in front, ensure it does not strip auth headers or rewrite the path.
Defensive patterns

Strategy: try-catch

Try / catch

if err := client.GetJSON(ctx, "/api/runtimes", &runtimes); err != nil {
	return fmt.Errorf("list runtimes: %w", err) // inspect wrapped status: 401 -> re-login, 404 -> server too old
}

Prevention

When it happens

Trigger: Running `multica runtime list` when the server is unreachable, the token is expired/missing (401), the user lacks permission to list runtimes (403), or the endpoint does not exist yet on an older server (404).

Common situations: CLI pointed at a stale base URL; server not yet upgraded to a version exposing /api/runtimes; session credentials expired; running the command in an environment without the CLI config file.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/8c4a9cd1f0ee8126. Report an issue: GitHub.