{"record":{"id":"6fde0ce6fd09b7cc","repo":"multica-ai/multica","slug":"get-project-w","errorCode":null,"errorMessage":"get project: %w","messagePattern":"get project: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_project.go","lineNumber":276,"sourceCode":"}\n\nfunc runProjectGet(cmd *cobra.Command, args []string) error {\n\tclient, err := newAPIClient(cmd)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tprojectRef, err := resolveProjectID(ctx, client, args[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve project: %w\", err)\n\t}\n\n\tvar project map[string]any\n\tif err := client.GetJSON(ctx, \"/api/projects/\"+projectRef.ID, &project); err != nil {\n\t\treturn fmt.Errorf(\"get project: %w\", err)\n\t}\n\n\t// Breadcrumb to the resources sub-collection. Goes to stderr so JSON on\n\t// stdout stays parseable; the `resource_count` field on the response is\n\t// the programmatic equivalent. JSON numbers decode as float64.\n\tif n, _ := project[\"resource_count\"].(float64); n > 0 {\n\t\tfmt.Fprintf(os.Stderr, \"%d resource(s) attached — run `multica project resource list %s` to view.\\n\",\n\t\t\tint64(n), strVal(project, \"id\"))\n\t}\n\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"table\" {\n\t\tactors := loadActorDisplayLookup(ctx, client)\n\t\tlead := formatLead(project, actors)\n\t\theaders := []string{\"ID\", \"TITLE\", \"STATUS\", \"LEAD\", \"DESCRIPTION\"}\n\t\trows := [][]string{{\n\t\t\tstrVal(project, \"id\"),\n\t\t\tstrVal(project, \"title\"),","sourceCodeStart":258,"sourceCodeEnd":294,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_project.go#L258-L294","documentation":"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.","triggerScenarios":"Project deleted between the two calls (race); 403 because the token can search but not read that project; server 5xx; connection dropped mid-session.","commonSituations":"Concurrent CLI/web use where someone deletes or archives the project; token scoped narrowly; flaky network to a remote server.","solutions":["Re-list projects to confirm the ID still exists: `multica project list --full-id`.","Retry once — transient 5xx/network failures resolve themselves.","If 403, check the token's workspace scope or re-login with an account that has read access."],"exampleFix":"# before\nmultica project get 3f2a91c4...   # get project: 404 (deleted moments ago)\n\n# after\nmultica project list --full-id      # confirm it is gone, pick an existing ID\nmultica project get <existing-id>","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := getCmd.Run(); err != nil {\n    if strings.Contains(err.Error(), \"get project\") {\n        if isTransient(err) { time.Sleep(time.Second); return getCmd.Run() }\n        if strings.Contains(err.Error(), \"404\") { /* project gone: refresh list */ }\n    }\n    return err\n}","preventionTips":["Retry once on transient 5xx/network before treating as fatal.","Refresh the ID from `project list` when a 404 appears — deletion races are common in shared workspaces.","Keep list+get in one script step so IDs are at most seconds old."],"tags":["cli","project","http","race-condition","go"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}