multica-ai/multica · error

get project: %w

Error message

get project: %w

What it means

Wrap in runProjectGet (cmd_project.go:276): resolution succeeded but the follow-up GET /api/projects/{resolvedID} failed. Distinct from 577: the ID was known-good enough to resolve, yet the direct fetch errored — typically the project vanished between resolution and fetch, permissions differ between endpoints, or a transient server error.

Source

Thrown at server/cmd/multica/cmd_project.go:276

}

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

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

	projectRef, err := resolveProjectID(ctx, client, args[0])
	if err != nil {
		return fmt.Errorf("resolve project: %w", err)
	}

	var project map[string]any
	if err := client.GetJSON(ctx, "/api/projects/"+projectRef.ID, &project); err != nil {
		return fmt.Errorf("get project: %w", err)
	}

	// Breadcrumb to the resources sub-collection. Goes to stderr so JSON on
	// stdout stays parseable; the `resource_count` field on the response is
	// the programmatic equivalent. JSON numbers decode as float64.
	if n, _ := project["resource_count"].(float64); n > 0 {
		fmt.Fprintf(os.Stderr, "%d resource(s) attached — run `multica project resource list %s` to view.\n",
			int64(n), strVal(project, "id"))
	}

	output, _ := cmd.Flags().GetString("output")
	if output == "table" {
		actors := loadActorDisplayLookup(ctx, client)
		lead := formatLead(project, actors)
		headers := []string{"ID", "TITLE", "STATUS", "LEAD", "DESCRIPTION"}
		rows := [][]string{{
			strVal(project, "id"),
			strVal(project, "title"),

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Re-list projects to confirm the ID still exists: `multica project list --full-id`.
  2. Retry once — transient 5xx/network failures resolve themselves.
  3. If 403, check the token's workspace scope or re-login with an account that has read access.

Example fix

# before
multica project get 3f2a91c4...   # get project: 404 (deleted moments ago)

# after
multica project list --full-id      # confirm it is gone, pick an existing ID
multica project get <existing-id>
Defensive patterns

Strategy: retry

Try / catch

if err := getCmd.Run(); err != nil {
    if strings.Contains(err.Error(), "get project") {
        if isTransient(err) { time.Sleep(time.Second); return getCmd.Run() }
        if strings.Contains(err.Error(), "404") { /* project gone: refresh list */ }
    }
    return err
}

Prevention

When it happens

Trigger: Project deleted between the two calls (race); 403 because the token can search but not read that project; server 5xx; connection dropped mid-session.

Common situations: Concurrent CLI/web use where someone deletes or archives the project; token scoped narrowly; flaky network to a remote server.

Related errors


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