{"record":{"id":"b77da8b3c78db330","repo":"github/github-mcp-server","slug":"field-name-must-not-be-empty","errorCode":null,"errorMessage":"field name must not be empty","messagePattern":"field name must not be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/github/projects_resolver.go","lineNumber":216,"sourceCode":"\t\t\t\tcandidates = append(candidates, map[string]any{\"id\": field.ID, \"data_type\": field.DataType})\n\t\t\t}\n\t\t\treturn nil, ghErrors.NewStructuredResolutionError(\n\t\t\t\t\"field_ambiguous\",\n\t\t\t\tname,\n\t\t\t\tfmt.Sprintf(\"multiple fields share this name; pass numeric IDs via '%s' to disambiguate\", idParameter),\n\t\t\t\tcandidates,\n\t\t\t)\n\t\t}\n\t}\n\treturn resolved, nil\n}\n\n// resolveProjectFieldByName resolves a field by display name. Returns a\n// structured error on not-found, ambiguous, or wrong-data-type (when\n// expectedDataType is set) so the agent can self-correct.\nfunc resolveProjectFieldByName(ctx context.Context, gqlClient *githubv4.Client, owner, ownerType string, projectNumber int, fieldName, expectedDataType string) (*ResolvedField, error) {\n\tif fieldName == \"\" {\n\t\treturn nil, fmt.Errorf(\"field name must not be empty\")\n\t}\n\n\tall, err := listAllProjectFields(ctx, gqlClient, owner, ownerType, projectNumber)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tvar matches []ResolvedField\n\tfor _, f := range all {\n\t\tif strings.EqualFold(f.Name, fieldName) {\n\t\t\tmatches = append(matches, f)\n\t\t}\n\t}\n\n\tif len(matches) == 0 {\n\t\tcandidates := make([]any, 0, len(all))\n\t\tfor _, f := range all {\n\t\t\tcandidates = append(candidates, map[string]any{","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/github/github-mcp-server/blob/0ea1f775a7c73eff1bd2e25904d01136756bbfe2/pkg/github/projects_resolver.go#L198-L234","documentation":"Error \"field name must not be empty\" thrown in github/github-mcp-server.","triggerScenarios":"Thrown at pkg/github/projects_resolver.go:216 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0ea1f775a7c73eff1bd2e25904d01136756bbfe2","analyzedAt":"2026-08-15T18:10:19.804Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}