{"record":{"id":"14eeb2638c45278e","repo":"gastownhall/beads","slug":"unsupported-update-field-q","errorCode":null,"errorMessage":"unsupported update field %q","messagePattern":"unsupported update field %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/update.go","lineNumber":751,"sourceCode":"\t\t\t\tif err != nil {\n\t\t\t\t\treturn issueops.IssuePatch{}, err\n\t\t\t\t}\n\t\t\t\tpatch.Metadata.Set = set\n\t\t\t}\n\t\tcase storageissueops.OpUnsetMetadata:\n\t\t\tpatch.Metadata.Unset, ok = value.([]string)\n\t\tcase \"wisp\":\n\t\t\tvar flag bool\n\t\t\tif flag, ok = value.(bool); ok {\n\t\t\t\twisp = &flag\n\t\t\t}\n\t\tcase \"no_history\":\n\t\t\tvar flag bool\n\t\t\tif flag, ok = value.(bool); ok {\n\t\t\t\tnoHistory = &flag\n\t\t\t}\n\t\tdefault:\n\t\t\treturn issueops.IssuePatch{}, fmt.Errorf(\"unsupported update field %q\", key)\n\t\t}\n\t\tif !ok {\n\t\t\treturn issueops.IssuePatch{}, fmt.Errorf(\"unsupported value %T for update field %q\", value, key)\n\t\t}\n\t}\n\t// --ephemeral/--persistent/--no-history/--history select one complete\n\t// persistence state. The flag parsing already rejects the contradictory\n\t// pairs; the remaining combinations resolve most-specific-first, which\n\t// reproduces the column pairs the old two-boolean write produced.\n\tswitch {\n\tcase wisp != nil && *wisp:\n\t\tpatch.Persistence = setField(issueops.PersistenceModeEphemeral)\n\tcase noHistory != nil && *noHistory:\n\t\tpatch.Persistence = setField(issueops.PersistenceModeNoHistory)\n\tcase wisp != nil || noHistory != nil:\n\t\tpatch.Persistence = setField(issueops.PersistenceModePersistent)\n\t}\n\treturn patch, nil","sourceCodeStart":733,"sourceCodeEnd":769,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/update.go#L733-L769","documentation":"buildUpdatePatch (cmd/bd/update.go) converts a map of update fields (from `bd update` flags or a proxied update request) into an issueops.IssuePatch. It switches on the field key and returns this error for any key it does not recognize. It indicates the caller supplied a field name outside the supported set (e.g. a typo like 'tittle' or an API payload using a renamed/removed field).","triggerScenarios":"`bd update <id> --unknown-flag` mapping into a map key the switch does not handle; a proxiedUpdatePatch client sending JSON with an outdated or misspelled field name to the update endpoint.","commonSituations":"Scripting against the bd update payload with a field name from an older beads version that was renamed; typos in automation; proxy clients not updated after the patch schema changed.","solutions":["Check the exact accepted field names in buildUpdatePatch's switch (cmd/bd/update.go) and correct the key spelling","Update the client/script to the current beads patch schema (run `bd update --help` for supported flags)","If a needed field is genuinely missing, add a case for it in buildUpdatePatch (and set the corresponding IssuePatch field)","For proxied clients, upgrade the bd binary on both ends so payloads match the installed schema"],"exampleFix":"// before\nfields[\"assignned_to\"] = \"alice\"\n// after\nfields[\"assignee\"] = \"alice\"","handlingStrategy":"validation","validationCode":"allowed := map[string]bool{\"title\": true, \"description\": true, \"status\": true, \"priority\": true, \"assignee\": true, \"no_history\": true /* ...see buildUpdatePatch */}\nfor k := range fields {\n\tif !allowed[k] {\n\t\treturn fmt.Errorf(\"unknown update field %q\", k)\n\t}\n}","typeGuard":null,"tryCatchPattern":"patch, err := buildUpdatePatch(fields)\nif err != nil {\n\tvar ufe *unsupportedFieldError // or string match on \"unsupported update field\"\n\tif strings.Contains(err.Error(), \"unsupported update field\") {\n\t\t// log the offending key and fall back to allowed-field construction\n\t}\n\treturn err\n}","preventionTips":["Copy field names from `bd update --help` or the buildUpdatePatch switch rather than from memory","Pin bd versions across CLI and proxy clients so payloads match schemas","Add a unit test that round-trips every documented update field through buildUpdatePatch","Validate payload keys before sending updates in automation"],"tags":["go","cli","input-validation","update"],"backgroundTag":"unsupported-update-field","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}