{"record":{"id":"713b4450da4ba66d","repo":"multica-ai/multica","slug":"workspace-id-is-required-pass-an-id-slug-prefix-a","errorCode":null,"errorMessage":"workspace ID is required: pass an id/slug/prefix as argument or set MULTICA_WORKSPACE_ID","messagePattern":"workspace ID is required: pass an id/slug/prefix as argument or set MULTICA_WORKSPACE_ID","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_workspace.go","lineNumber":488,"sourceCode":"\t\t}\n\t\tctx, cancel := cli.APIContext(context.Background())\n\t\tdefer cancel()\n\t\tws, err := resolveWorkspaceRef(ctx, cmd, trimmed)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn ws.ID, nil\n\t}\n\treturn resolveWorkspaceID(cmd), nil\n}\n\nfunc runWorkspaceGet(cmd *cobra.Command, args []string) error {\n\twsID, err := resolveWorkspaceArg(cmd, args)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif wsID == \"\" {\n\t\treturn fmt.Errorf(\"workspace ID is required: pass an id/slug/prefix as argument or set MULTICA_WORKSPACE_ID\")\n\t}\n\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\tvar ws map[string]any\n\tif err := client.GetJSON(ctx, \"/api/workspaces/\"+wsID, &ws); err != nil {\n\t\treturn fmt.Errorf(\"get workspace: %w\", err)\n\t}\n\n\treturn printWorkspace(cmd, ws)\n}\n","sourceCodeStart":470,"sourceCodeEnd":506,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_workspace.go#L470-L506","documentation":"`multica workspace get` specifically requires a target: resolveWorkspaceArg returned an empty ID, meaning no positional argument was given, no default was resolvable, and MULTICA_WORKSPACE_ID is unset. This is a later, command-specific restatement of the empty-identifier checks so the user gets an actionable message naming both remediation routes.","triggerScenarios":"Running `multica workspace get` bare on a machine with no switched default workspace and no MULTICA_WORKSPACE_ID; or with an argument that resolves to empty after trimming.","commonSituations":"New installs, CI containers, or after a logout/reset cleared the default-workspace pointer.","solutions":["Pass the identifier explicitly: `multica workspace get <id|slug|prefix>`.","Export MULTICA_WORKSPACE_ID in your shell/profile or CI environment.","Run `multica workspace switch <id|slug|prefix>` once so future bare invocations inherit the default."],"exampleFix":"# before\nmultica workspace get\n\n# after\nexport MULTICA_WORKSPACE_ID=00000000-0000-0000-0000-000000000000\nmultica workspace get","handlingStrategy":"validation","validationCode":": \"${WS:=${MULTICA_WORKSPACE_ID:-}}\"\n[ -n \"$WS\" ] || { echo 'pass <id|slug|prefix> or set MULTICA_WORKSPACE_ID'; exit 1; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set MULTICA_WORKSPACE_ID in shell profiles and CI templates.","Run `multica workspace switch` after login so `workspace get` needs no argument."],"tags":["cli","validation","workspace","environment"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}