{"record":{"id":"f5e29721230c4d6c","repo":"multica-ai/multica","slug":"resolve-label-w-f5e297","errorCode":null,"errorMessage":"resolve label: %w","messagePattern":"resolve label: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_label.go","lineNumber":139,"sourceCode":"\t\t\tstrVal(l, \"color\"),\n\t\t\tcreated,\n\t\t})\n\t}\n\tcli.PrintTable(os.Stdout, headers, rows)\n\treturn nil\n}\n\nfunc runLabelGet(cmd *cobra.Command, args []string) error {\n\tclient, err := newAPIClient(cmd)\n\tif err != nil {\n\t\treturn err\n\t}\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tlabelRef, err := resolveLabelID(ctx, client, args[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve label: %w\", err)\n\t}\n\n\tvar label map[string]any\n\tif err := client.GetJSON(ctx, \"/api/labels/\"+labelRef.ID, &label); err != nil {\n\t\treturn fmt.Errorf(\"get label: %w\", err)\n\t}\n\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"table\" {\n\t\theaders := []string{\"ID\", \"NAME\", \"COLOR\", \"CREATED\"}\n\t\tcreated := strVal(label, \"created_at\")\n\t\tif len(created) >= 10 {\n\t\t\tcreated = created[:10]\n\t\t}\n\t\trows := [][]string{{\n\t\t\tstrVal(label, \"id\"),\n\t\t\tstrVal(label, \"name\"),\n\t\t\tstrVal(label, \"color\"),","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_label.go#L121-L157","documentation":"Wraps a resolveLabelID failure while `multica label get` resolves its positional argument. Label resolution fetches all labels for the client's workspace (requires workspace_id) and matches by ID prefix or name; failure means either the candidate fetch failed or no label matched.","triggerScenarios":"Passing a label name or ID prefix with no match in the workspace; no workspace configured on the client (resolver errors with 'workspace_id is required to resolve label id prefixes'); the candidate-list GET /api/labels failing on auth/network.","commonSituations":"Label renamed or deleted; wrong workspace selected; typo in the label name; running in a daemon/task context without a workspace context.","solutions":["Run `multica label list` to see the exact names/IDs available in the current workspace","Ensure a workspace is selected/configured for the CLI profile","Use the full label UUID to avoid prefix ambiguity","Fix auth/network if the listing itself errors"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# bash: confirm the label exists before getting it\nmultica label list --output json | jq -e --arg n \"$LABEL\" '.[] | select(.name == $n)' >/dev/null \\\n  || { echo \"no label named $LABEL\" >&2; exit 2; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pre-list labels and match exact names","Keep a workspace selected in the profile","Prefer full UUIDs in automation"],"tags":["cli","id-resolution","labels"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}