github/github-mcp-server · error
missing %s
Error message
missing %s
What it means
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.
Source
Thrown at pkg/github/projects_batch.go:460
}
func itemRefEcho(entry map[string]any) map[string]any {
ref := map[string]any{}
for _, key := range []string{"node_id", "item_id", "item_owner", "item_repo", "issue_number"} {
if v, ok := entry[key]; ok {
ref[key] = v
}
}
if len(ref) == 0 {
return nil
}
return ref
}
func stringFromEntry(entry map[string]any, key string) (string, error) {
v, ok := entry[key]
if !ok {
return "", fmt.Errorf("missing %s", key)
}
s, ok := v.(string)
if !ok || s == "" {
return "", fmt.Errorf("%s must be a non-empty string", key)
}
return s, nil
}
func intFromEntry(entry map[string]any, key string) (int, error) {
v, ok := entry[key]
if !ok {
return 0, fmt.Errorf("missing %s", key)
}
n, err := validatePositiveInt64(v)
if err != nil {
return 0, fmt.Errorf("%s must be a positive integer: %w", key, err)
}
if n > math.MaxInt32 {View on GitHub (pinned to 0ea1f775a7)
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
Example fix
// before
{"item_repo": "repo", "issue_number": 7}
// after
{"item_owner": "octo", "item_repo": "repo", "issue_number": 7} Defensive patterns
Strategy: validation
Validate before calling
for _, k := range []string{"item_owner", "item_repo", "issue_number"} {
if _, ok := entry[k]; !ok {
return fmt.Errorf("issue-ref item is missing %s", k)
}
} Type guard
func hasAllIssueKeys(entry map[string]any) bool {
for _, k := range []string{"item_owner", "item_repo", "issue_number"} {
if _, ok := entry[k]; !ok { return false }
}
return true
} Prevention
- 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
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- item_owner, item_repo, and issue_number must all be provided
- %s must be a non-empty string
- %s must be a positive integer: %w
- %s exceeds the GraphQL Int maximum of %d
- updated_field.value is required
AI-assisted analysis of github/github-mcp-server@0ea1f775a7 (2026-08-15).
Data as JSON: /api/errors/b0e78ab1a20700b2.
Report an issue: GitHub.