{"record":{"id":"8ad1e1ebfdd5f61f","repo":"zeromicro/go-zero","slug":"s-rpc-method-s-not-found","errorCode":null,"errorMessage":"%s: rpc method %s not found","messagePattern":"(.+?): rpc method (.+?) not found","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gateway/server.go","lineNumber":177,"sourceCode":"\n\tresolver := grpcurl.AnyResolverFromDescriptorSource(source)\n\tfor _, m := range methods {\n\t\tif len(m.HttpMethod) > 0 && len(m.HttpPath) > 0 {\n\t\t\twriter.Write(rest.Route{\n\t\t\t\tMethod:  m.HttpMethod,\n\t\t\t\tPath:    m.HttpPath,\n\t\t\t\tHandler: s.buildGrpcHandler(source, resolver, cli, m.RpcPath),\n\t\t\t})\n\t\t}\n\t}\n\n\tmethodSet := make(map[string]struct{})\n\tfor _, m := range methods {\n\t\tmethodSet[m.RpcPath] = struct{}{}\n\t}\n\tfor _, m := range up.Mappings {\n\t\tif _, ok := methodSet[m.RpcPath]; !ok {\n\t\t\tcancel(fmt.Errorf(\"%s: rpc method %s not found\", up.Name, m.RpcPath))\n\t\t\treturn\n\t\t}\n\n\t\twriter.Write(rest.Route{\n\t\t\tMethod:  strings.ToUpper(m.Method),\n\t\t\tPath:    m.Path,\n\t\t\tHandler: s.buildGrpcHandler(source, resolver, cli, m.RpcPath),\n\t\t})\n\t}\n}\n\nfunc (s *Server) buildHttpHandler(target *HttpClientConf) http.HandlerFunc {\n\thandler := func(w http.ResponseWriter, r *http.Request) {\n\t\tw.Header().Set(httpx.ContentType, httpx.JsonContentType)\n\t\treq, err := buildRequestWithNewTarget(r, target)\n\t\tif err != nil {\n\t\t\thttpx.ErrorCtx(r.Context(), w, err)\n\t\t\treturn","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/zeromicro/go-zero/blob/11f21098ddd95a58f801920fea4f0543d4d01586/gateway/server.go#L159-L195","documentation":"Error \"%s: rpc method %s not found\" thrown in zeromicro/go-zero.","triggerScenarios":"Thrown at gateway/server.go:177 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":"11f21098ddd95a58f801920fea4f0543d4d01586","analyzedAt":"2026-08-15T15:59:26.308Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}