{"record":{"id":"b0e78ab1a20700b2","repo":"github/github-mcp-server","slug":"missing-s","errorCode":null,"errorMessage":"missing %s","messagePattern":"missing (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/projects_batch.go","lineNumber":460,"sourceCode":"}\n\nfunc itemRefEcho(entry map[string]any) map[string]any {\n\tref := map[string]any{}\n\tfor _, key := range []string{\"node_id\", \"item_id\", \"item_owner\", \"item_repo\", \"issue_number\"} {\n\t\tif v, ok := entry[key]; ok {\n\t\t\tref[key] = v\n\t\t}\n\t}\n\tif len(ref) == 0 {\n\t\treturn nil\n\t}\n\treturn ref\n}\n\nfunc stringFromEntry(entry map[string]any, key string) (string, error) {\n\tv, ok := entry[key]\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"missing %s\", key)\n\t}\n\ts, ok := v.(string)\n\tif !ok || s == \"\" {\n\t\treturn \"\", fmt.Errorf(\"%s must be a non-empty string\", key)\n\t}\n\treturn s, nil\n}\n\nfunc intFromEntry(entry map[string]any, key string) (int, error) {\n\tv, ok := entry[key]\n\tif !ok {\n\t\treturn 0, fmt.Errorf(\"missing %s\", key)\n\t}\n\tn, err := validatePositiveInt64(v)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"%s must be a positive integer: %w\", key, err)\n\t}\n\tif n > math.MaxInt32 {","sourceCodeStart":442,"sourceCodeEnd":478,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/projects_batch.go#L442-L478","documentation":"Raised by stringFromEntry (pkg/github/projects_batch.go:460) during issue-ref validation when item_owner or item_repo is entirely absent from the item object. It surfaces wrapped inside the 'must all be provided together' message from parseItemRef. The item is rejected as 'invalid_item_ref' before any network call.","triggerScenarios":"An item in the issue-ref form where at least one issue key exists but item_owner or item_repo has no entry at all — e.g. {\"item_repo\":\"repo\",\"issue_number\":7} (owner missing) or {\"item_owner\":\"octo\",\"issue_number\":7} (repo missing).","commonSituations":"Splitting owner/repo configuration from per-item numbers (owner defaulted elsewhere but not merged in); dropping keys when a source record has empty fields and the serializer omits them; renaming keys between pipeline stages.","solutions":["Add the missing key named in the message (missing item_owner or missing item_repo)","Merge global owner/repo defaults into every item before sending if your config keeps them separate","Reject rows with absent owner/repo at ingestion time instead of forwarding them","Remember a key set to null is NOT 'missing' — that hits the non-empty-string error instead"],"exampleFix":"// before\n{\"item_repo\": \"repo\", \"issue_number\": 7}\n// after\n{\"item_owner\": \"octo\", \"item_repo\": \"repo\", \"issue_number\": 7}","handlingStrategy":"validation","validationCode":"for _, k := range []string{\"item_owner\", \"item_repo\", \"issue_number\"} {\n\tif _, ok := entry[k]; !ok {\n\t\treturn fmt.Errorf(\"issue-ref item is missing %s\", k)\n\t}\n}","typeGuard":"func hasAllIssueKeys(entry map[string]any) bool {\n\tfor _, k := range []string{\"item_owner\", \"item_repo\", \"issue_number\"} {\n\t\tif _, ok := entry[k]; !ok { return false }\n\t}\n\treturn true\n}","tryCatchPattern":null,"preventionTips":["Merge global owner/repo defaults into each item before sending","Remember: null is not 'missing' — omitting the key gives this error, null gives the string-type error","Validate key presence over the whole items array in one pre-flight pass"],"tags":["github-projects","batch","input-validation","issue-ref","missing-key"],"backgroundTag":null,"analyzedSha":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}