{"record":{"id":"93f0d0a87bd9c3f3","repo":"grpc-ecosystem/grpc-gateway","slug":"no-field-s-found","errorCode":null,"errorMessage":"no field %s found","messagePattern":"no field (.+?) found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/descriptor/registry.go","lineNumber":812,"sourceCode":"\tfor _, opt := range opts.Service {\n\t\tqualifiedService := \".\" + opt.Service\n\t\tif _, ok := services[qualifiedService]; !ok {\n\t\t\treturn fmt.Errorf(\"no service %s found\", opt.Service)\n\t\t}\n\t\tr.serviceOptions[qualifiedService] = opt.Option\n\t}\n\n\t// build map of all registered fields\n\tfields := make(map[string]struct{})\n\tfor _, m := range r.msgs {\n\t\tfor _, f := range m.Fields {\n\t\t\tfields[f.FQFN()] = struct{}{}\n\t\t}\n\t}\n\tfor _, opt := range opts.Field {\n\t\tqualifiedField := \".\" + opt.Field\n\t\tif _, ok := fields[qualifiedField]; !ok {\n\t\t\treturn fmt.Errorf(\"no field %s found\", opt.Field)\n\t\t}\n\t\tr.fieldOptions[qualifiedField] = opt.Option\n\t}\n\treturn nil\n}\n\n// GetOpenAPIFileOption returns a registered OpenAPI option for a file\nfunc (r *Registry) GetOpenAPIFileOption(file string) (*options.Swagger, bool) {\n\topt, ok := r.fileOptions[file]\n\treturn opt, ok\n}\n\n// GetOpenAPIMethodOption returns a registered OpenAPI option for a method\nfunc (r *Registry) GetOpenAPIMethodOption(qualifiedMethod string) (*options.Operation, bool) {\n\topt, ok := r.methodOptions[qualifiedMethod]\n\treturn opt, ok\n}\n","sourceCodeStart":794,"sourceCodeEnd":830,"githubUrl":"https://github.com/grpc-ecosystem/grpc-gateway/blob/a58a4436a376a4bcc7d8f10c4d4f919a8438bba9/internal/descriptor/registry.go#L794-L830","documentation":"Field-level options are validated against a map of fully-qualified field names (FQFN) built from all registered messages. If opts.Field names a field whose qualified name is not present, this error is returned and option registration aborts.","triggerScenarios":"Registering options with opts.Field referencing a field that does not exist, is misspelled, is missing package/message qualification, or whose message lives in an unloaded file.","commonSituations":"Field renamed or removed from a message; qualifying only by message name without package; targeting a field inside a oneof/nested message with an incorrect path; options shared across repos with diverging schemas.","solutions":["Use the fully-qualified field name: pkg.Message.field","Verify the field still exists on the message in the loaded protos","Update the options entry after schema refactors","Compare your field list against the registry's collected FQFNs"],"exampleFix":"// before\nField: \"Book.title\"\n// after\nField: \"examples.library.v1.Book.title\"","handlingStrategy":"validation","validationCode":"want := \".\" + opt.Field\nif !knownFields[want] {\n    return fmt.Errorf(\"field %q not found; use pkg.Message.field\", opt.Field)\n}\nerr = reg.RegisterOptions(opts)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use fully-qualified field names (pkg.Message.field) in options entries","Update options entries in the same change that renames or removes fields","Generate the field list from descriptors instead of hand-writing it"],"tags":["configuration","protobuf","options"],"backgroundTag":"unknown-symbol-reference","analyzedSha":"a58a4436a376a4bcc7d8f10c4d4f919a8438bba9","analyzedAt":"2026-09-02T10:28:31.537Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T16:17:10.729Z"}