{"record":{"id":"61a71755ce53b1db","repo":"multica-ai/multica","slug":"no-fields-to-update-use-name-description-61a717","errorCode":null,"errorMessage":"no fields to update; use --name, --description, --context, or --issue-prefix","messagePattern":"no fields to update; use --name, --description, --context, or --issue-prefix","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"server/cmd/multica/cmd_workspace.go","lineNumber":586,"sourceCode":"\t}\n\treturn body, nil\n}\n\nfunc runWorkspaceUpdate(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\tbody, err := buildWorkspaceUpdateBody(cmd)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif len(body) == 0 {\n\t\treturn fmt.Errorf(\"no fields to update; use --name, --description, --context, or --issue-prefix\")\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.PatchJSON(ctx, \"/api/workspaces/\"+wsID, body, &ws); err != nil {\n\t\treturn fmt.Errorf(\"update workspace: %w\", err)\n\t}\n\n\treturn printWorkspace(cmd, ws)\n}\n","sourceCodeStart":568,"sourceCodeEnd":604,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_workspace.go#L568-L604","documentation":"Local validation in `multica workspace update`: the request body built from changed flags is empty. The PATCH endpoint only updates fields whose flags were explicitly set (--name, --description, --context, --issue-prefix); if none changed, sending a request would be a no-op, so the CLI aborts.","triggerScenarios":"Running `multica workspace update <ws>` with no update flags at all, or with flags set to their default values such that `cmd.Flags().Changed()` reports false for each.","commonSituations":"Using `workspace update` as if it were `workspace get`; quoting mistakes that make flags land as positional args instead of `--flag value`; flags defined in a config file rather than on the command line (Changed() is false for persisted defaults).","solutions":["Add at least one update flag: --name, --description, --context, or --issue-prefix","Verify flag syntax: `multica workspace update acme --name \"New Name\"`","To only view a workspace, use `multica workspace get <ws>` instead"],"exampleFix":"# before\nmultica workspace update acme\n\n# after\nmultica workspace update acme --description \"Primary workspace\"","handlingStrategy":"validation","validationCode":"flags := []string{\"name\", \"description\", \"context\", \"issue-prefix\"}\nfor _, f := range flags {\n    if cmd.Flags().Changed(f) {\n        return nil // body will be non-empty\n    }\n}\nreturn errors.New(\"no fields to update\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use `workspace get` to view and `workspace update --<field>` to change","Remember flags must appear on the command line; config-file defaults do not count as Changed","Check flag spelling — a typo'd flag silently makes the body empty"],"tags":["cli","validation","workspace","usage"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}