{"record":{"id":"0320c522bf00c998","repo":"multica-ai/multica","slug":"resolve-project-w-0320c5","errorCode":null,"errorMessage":"resolve project: %w","messagePattern":"resolve project: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_project.go","lineNumber":271,"sourceCode":"\t\t\tcreated,\n\t\t})\n\t}\n\tcli.PrintTable(os.Stdout, headers, rows)\n\treturn nil\n}\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)","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_project.go#L253-L289","documentation":"Wrap in runProjectGet (cmd_project.go:271): resolveProjectID failed to turn args[0] (an ID, slug, or ID prefix per cmd_id_resolver.go:341) into a concrete project ID before any fetch happened. Resolution typically lists/searches projects to match the prefix or slug, so both 'no match', 'ambiguous prefix', and the underlying search request failing surface here.","triggerScenarios":"Passing a project ID prefix that matches zero projects ('not found') or several ('ambiguous'); passing a slug that was renamed/deleted; the resolution API call itself erroring (auth/network).","commonSituations":"Copy-pasting a truncated ID from table output that prints shortened IDs (note the --full-id flag on list); project deleted by a teammate; typos in slugs.","solutions":["Get the full ID first: `multica project list --full-id`, then use the complete ID.","If the error says ambiguous, lengthen the prefix until it is unique.","Confirm the project still exists and you have access to its workspace."],"exampleFix":"# before\nmultica project get 3f2a   # resolve project: ambiguous prefix\n\n# after\nmultica project list --full-id\nmultica project get 3f2a91c4-8e77-4b66-a1d2-0f5c9a8b7d31","handlingStrategy":"validation","validationCode":"projects := listProjectsJSON(client) // full IDs\nmatches := filterByPrefixOrSlug(projects, ref)\nif len(matches) == 0 { return fmt.Errorf(\"no project matches %q\", ref) }\nif len(matches) > 1 { return fmt.Errorf(\"ambiguous %q: %d matches\", ref, len(matches)) }","typeGuard":null,"tryCatchPattern":"if err := getCmd.Run(); err != nil {\n    if strings.Contains(err.Error(), \"resolve project\") {\n        // resolution failed: re-list with --full-id and retry with the exact ID\n    }\n}","preventionTips":["Always list with --full-id before scripting get/update/delete.","Use full UUIDs, not prefixes, in automation.","Resolve once, reuse the resolved ID for subsequent calls in the same script."],"tags":["cli","project","id-resolution","go"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}