{"record":{"id":"b4bb8808306e5705","repo":"github/github-mcp-server","slug":"field-filters-entry-s","errorCode":null,"errorMessage":"field_filters entry: %s","messagePattern":"field_filters entry: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/issues.go","lineNumber":3084,"sourceCode":"\tcase []any:\n\t\tfor _, f := range v {\n\t\t\tentry, ok := f.(map[string]any)\n\t\t\tif !ok {\n\t\t\t\treturn nil, fmt.Errorf(\"each field_filters entry must be an object\")\n\t\t\t}\n\t\t\tentries = append(entries, entry)\n\t\t}\n\tcase []map[string]any:\n\t\tentries = v\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"field_filters must be an array\")\n\t}\n\n\tfilters := make([]rawFieldFilter, 0, len(entries))\n\tfor _, entry := range entries {\n\t\tfieldName, err := RequiredParam[string](entry, \"field_name\")\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"field_filters entry: %s\", err.Error())\n\t\t}\n\t\tvalue, err := RequiredParam[string](entry, \"value\")\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"field_filters entry %q: %s\", fieldName, err.Error())\n\t\t}\n\t\tfilters = append(filters, rawFieldFilter{Name: fieldName, Value: value})\n\t}\n\treturn filters, nil\n}\n\n// resolveFieldFilters matches each raw filter against a known field definition and\n// coerces the value into the right typed slot on IssueFieldValueFilter. Matching is\n// case-insensitive on field name; option names are also matched case-insensitively for\n// single-select fields.\nfunc resolveFieldFilters(rawFilters []rawFieldFilter, fields []IssueField) ([]IssueFieldValueFilter, error) {\n\tbyName := make(map[string]IssueField, len(fields))\n\tknownNames := make([]string, 0, len(fields))\n\tfor _, f := range fields {","sourceCodeStart":3066,"sourceCodeEnd":3102,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/issues.go#L3066-L3102","documentation":"While parsing a field_filters entry, the required string parameter field_name is missing, empty, or not a string. The embedded RequiredParam error text (\"missing required parameter: field_name\" or \"parameter field_name is not of type string\") is appended after the 'field_filters entry:' prefix.","triggerScenarios":"A field_filters entry object that omits field_name, sets it to \"\", or supplies a non-string (e.g. {\"value\":\"Bug\"} or {\"field_name\":123,\"value\":\"Bug\"}).","commonSituations":"An LLM uses a different key such as \"field\" or \"name\"; a script leaves field_name empty for a value-only filter.","solutions":["Add a non-empty string field_name naming the repository issue field to every entry","Check the exact spelling of the key — it is field_name, not field or name","Ensure the value is a JSON string, not a number"],"exampleFix":"// before\n{\"field_filters\":[{\"name\":\"Status\",\"value\":\"Bug\"}]}\n// after\n{\"field_filters\":[{\"field_name\":\"Status\",\"value\":\"Bug\"}]}","handlingStrategy":"validation","validationCode":"func requireFieldName(entry map[string]any) error {\n\tname, ok := entry[\"field_name\"]\n\tif !ok || name == \"\" {\n\t\treturn fmt.Errorf(\"field_name is required in every field_filters entry\")\n\t}\n\tif _, ok := name.(string); !ok {\n\t\treturn fmt.Errorf(\"field_name must be a string\")\n\t}\n\treturn nil\n}","typeGuard":"func hasStringKey(m map[string]any, key string) bool {\n\ts, ok := m[key].(string)\n\treturn ok && s != \"\"\n}","tryCatchPattern":null,"preventionTips":["Use the exact key 'field_name' (snake_case) in every entry","Define a struct with json tags for filters instead of ad-hoc maps"],"tags":["validation","field-filters","required-param","issues"],"backgroundTag":null,"analyzedSha":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}