{"record":{"id":"0d303c8e54352bf0","repo":"grpc-ecosystem/grpc-gateway","slug":"no-service-s-found","errorCode":null,"errorMessage":"no service %s found","messagePattern":"no service (.+?) found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/descriptor/registry.go","lineNumber":797,"sourceCode":"\t\tqualifiedMethod := \".\" + opt.Method\n\t\tif _, ok := methods[qualifiedMethod]; !ok {\n\t\t\treturn fmt.Errorf(\"no method %s found\", opt.Method)\n\t\t}\n\t\tr.methodOptions[qualifiedMethod] = opt.Option\n\t}\n\n\tfor _, opt := range opts.Message {\n\t\tqualifiedMessage := \".\" + opt.Message\n\t\tif _, ok := r.msgs[qualifiedMessage]; !ok {\n\t\t\treturn fmt.Errorf(\"no message %s found\", opt.Message)\n\t\t}\n\t\tr.messageOptions[qualifiedMessage] = opt.Option\n\t}\n\n\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}","sourceCodeStart":779,"sourceCodeEnd":815,"githubUrl":"https://github.com/grpc-ecosystem/grpc-gateway/blob/a58a4436a376a4bcc7d8f10c4d4f919a8438bba9/internal/descriptor/registry.go#L779-L815","documentation":"Service-level options are checked against the set of fully-qualified service names built from registered files. If opts.Service names a service not found in that set, the registry returns this error rather than dropping the option silently.","triggerScenarios":"Registering options with opts.Service set to a service that is misspelled, lacks its package prefix, was removed/renamed, or whose defining file was not loaded.","commonSituations":"Options config copied from another API; service renamed in a major-version bump; running the generator only on a subset of protos while the options file still targets services from the full set.","solutions":["Use the fully-qualified service name: pkg.ServiceName","Ensure the .proto defining the service is in the load set","Sync your options file with the current proto definitions","Check for typos and correct package prefix"],"exampleFix":"// before\nService: \"EchoService\"\n// after\nService: \"grpc.gateway.examples.v1.EchoService\"","handlingStrategy":"validation","validationCode":"want := \".\" + opt.Service\nif !knownServices[want] {\n    return fmt.Errorf(\"service %q not found; use pkg.Service\", opt.Service)\n}\nerr = reg.RegisterOptions(opts)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Include the proto package prefix in every service reference","Ensure every proto defining an options-targeted service is in the generator's file set","Validate options targets against the compiled FileDescriptorSet before running the plugin"],"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"}