{"record":{"id":"e810aeb08751872e","repo":"github/github-mcp-server","slug":"updated-field-value-is-required-e810ae","errorCode":null,"errorMessage":"updated_field.value is required","messagePattern":"updated_field\\.value is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/projects_batch.go","lineNumber":510,"sourceCode":"\treturn n, nil\n}\n\ntype batchFieldSpec struct {\n\tid    int64\n\tname  string\n\tvalue any\n}\n\nfunc parseBatchFieldSpec(raw any) (batchFieldSpec, error) {\n\tvar spec batchFieldSpec\n\tinput, ok := raw.(map[string]any)\n\tif !ok || input == nil {\n\t\treturn spec, fmt.Errorf(\"updated_field must be an object\")\n\t}\n\n\tvalue, hasValue := input[\"value\"]\n\tif !hasValue {\n\t\treturn spec, fmt.Errorf(\"updated_field.value is required\")\n\t}\n\tspec.value = value\n\n\tidField, hasID := input[\"id\"]\n\tnameField, hasName := input[\"name\"]\n\tswitch {\n\tcase hasID && hasName:\n\t\treturn spec, fmt.Errorf(\"updated_field must set either id or name, not both\")\n\tcase !hasID && !hasName:\n\t\treturn spec, fmt.Errorf(\"updated_field requires either id or name\")\n\tcase hasID:\n\t\tid, err := validatePositiveInt64(idField)\n\t\tif err != nil {\n\t\t\treturn spec, fmt.Errorf(\"updated_field.id: %w\", err)\n\t\t}\n\t\tspec.id = id\n\tdefault:\n\t\tname, ok := nameField.(string)","sourceCodeStart":492,"sourceCodeEnd":528,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/projects_batch.go#L492-L528","documentation":"Raised by parseBatchFieldSpec (pkg/github/projects_batch.go:510) when the updated_field object exists but contains no 'value' key. value is required because the batch tool updates one field across all items; note that presence is checked with a two-value map lookup, so a key explicitly set to null passes this check (and may fail later type conversion instead).","triggerScenarios":"{\"updated_field\": {\"name\": \"Status\"}} — field identified but no value key at all. Also typos like \"values\", \"val\", or \"field_value\" leave the required key absent and trigger this error, failing the whole request up front.","commonSituations":"Typos in hand-written payloads; schema confusion between 'value' and 'option'; building the object conditionally and skipping the value assignment when a variable is empty.","solutions":["Add the value key: {\"name\": \"Status\", \"value\": \"Done\"}","Check the spelling — it is exactly 'value', singular","Decide the value once and apply it to the whole batch; per-item values are not supported by this tool","Lint the payload: after name/id, assert a value key exists (even null must be intentional)"],"exampleFix":"// before\n{\"updated_field\": {\"name\": \"Status\"}}\n// after\n{\"updated_field\": {\"name\": \"Status\", \"value\": \"Done\"}}","handlingStrategy":"validation","validationCode":"if _, ok := spec[\"value\"]; !ok {\n\treturn fmt.Errorf(\"updated_field.value is required\")\n}","typeGuard":"func hasValueKey(spec map[string]any) bool { _, ok := spec[\"value\"]; return ok }","tryCatchPattern":null,"preventionTips":["Use the exact key 'value' (singular)","Build the spec from a struct with a value field so the key can never be dropped","Note null passes the presence check but will fail type conversion for typed fields — mean it or omit it"],"tags":["github-projects","batch","input-validation","updated-field","missing-key"],"backgroundTag":null,"analyzedSha":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}