{"record":{"id":"5080223412b14f95","repo":"multica-ai/multica","slug":"nothing-to-update-pass-name-description-i","errorCode":null,"errorMessage":"nothing to update; pass --name, --description, --icon, or --option","messagePattern":"nothing to update; pass --name, --description, --icon, or --option","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"server/cmd/multica/cmd_property.go","lineNumber":379,"sourceCode":"\tbody := map[string]any{}\n\tif cmd.Flags().Changed(\"name\") {\n\t\tname, _ := cmd.Flags().GetString(\"name\")\n\t\tbody[\"name\"] = name\n\t}\n\tif cmd.Flags().Changed(\"description\") {\n\t\tdescription, _ := cmd.Flags().GetString(\"description\")\n\t\tbody[\"description\"] = description\n\t}\n\tif cmd.Flags().Changed(\"icon\") {\n\t\ticon, _ := cmd.Flags().GetString(\"icon\")\n\t\tbody[\"icon\"] = icon\n\t}\n\tif cmd.Flags().Changed(\"option\") {\n\t\toptionFlags, _ := cmd.Flags().GetStringArray(\"option\")\n\t\tbody[\"config\"] = map[string]any{\"options\": parseOptionFlags(optionFlags, property.Config.Options)}\n\t}\n\tif len(body) == 0 {\n\t\treturn fmt.Errorf(\"nothing to update; pass --name, --description, --icon, or --option\")\n\t}\n\n\tvar updated propertyDTO\n\tif err := client.PatchJSON(ctx, \"/api/properties/\"+property.ID, body, &updated); err != nil {\n\t\treturn fmt.Errorf(\"update property: %w\", err)\n\t}\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(os.Stdout, updated)\n\t}\n\tfmt.Fprintf(os.Stdout, \"Property %q updated.\\n\", updated.Name)\n\tprintPropertyTable([]propertyDTO{updated})\n\treturn nil\n}\n\nfunc makePropertyArchiveRun(archive bool) func(*cobra.Command, []string) error {\n\treturn func(cmd *cobra.Command, args []string) error {\n\t\tclient, err := newAPIClient(cmd)","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_property.go#L361-L397","documentation":"Returned by `multica property update` when none of the mutators `--name`, `--description`, `--icon`, or `--option` were passed (checked via `cmd.Flags().Changed`). The command refuses to send an empty PATCH body, so this is pure client-side input validation.","triggerScenarios":"Running `multica property update <ref>` with no mutation flags, or with only the positional property reference; also when flags are set in a config file but not explicitly changed on the command line.","commonSituations":"User forgets which flags are mutable; scripts that conditionally build flag lists end up passing none; assuming `--name` refers to the target rather than the new name and omitting it.","solutions":["Add at least one mutation flag: `--name`, `--description`, `--icon`, or `--option`.","If you intended only to archive/restore, use `multica property archive|unarchive` instead.","In scripts, check that at least one of the four flags was appended before invoking the command."],"exampleFix":"// before\nmultica property update Priority\n// error: nothing to update; pass --name, --description, --icon, or --option\n\n// after\nmultica property update Priority --description \"Issue urgency\"","handlingStrategy":"validation","validationCode":"# bash: only invoke update when at least one mutator is set\n[ -n \"$NEW_NAME$NEW_DESC$NEW_ICON$NEW_OPTS\" ] || { echo 'nothing to update'; exit 0; }","typeGuard":"func hasUpdateFlags(cmd *cobra.Command) bool {\n    for _, f := range []string{\"name\", \"description\", \"icon\", \"option\"} {\n        if cmd.Flags().Changed(f) {\n            return true\n        }\n    }\n    return false\n}","tryCatchPattern":null,"preventionTips":["Remember the four mutators: --name, --description, --icon, --option.","Use `archive`/`unarchive` subcommands for lifecycle changes, not update."],"tags":["go","cli","validation","property"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}