{"record":{"id":"6767c54b54b6f73b","repo":"zeromicro/go-zero","slug":"s-w","errorCode":null,"errorMessage":"%s: %w","messagePattern":"%s: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"gateway/server.go","lineNumber":150,"sourceCode":"\t\t\thttpx.ErrorCtx(r.Context(), w, st.Err())\n\t\t}\n\t}\n\n\treturn s.buildChainHandler(handler)\n}\n\nfunc (s *Server) buildGrpcRoute(up Upstream, writer mr.Writer[rest.Route], cancel func(error)) {\n\tvar cli zrpc.Client\n\tif s.dialer != nil {\n\t\tcli = s.dialer(*up.Grpc)\n\t} else {\n\t\tcli = zrpc.MustNewClient(*up.Grpc)\n\t}\n\ts.conns = append(s.conns, cli)\n\n\tsource, err := createDescriptorSource(cli, up)\n\tif err != nil {\n\t\tcancel(fmt.Errorf(\"%s: %w\", up.Name, err))\n\t\treturn\n\t}\n\n\tmethods, err := internal.GetMethods(source)\n\tif err != nil {\n\t\tcancel(fmt.Errorf(\"%s: %w\", up.Name, err))\n\t\treturn\n\t}\n\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}","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/zeromicro/go-zero/blob/11f21098ddd95a58f801920fea4f0543d4d01586/gateway/server.go#L132-L168","documentation":"Error \"%s: %w\" thrown in zeromicro/go-zero.","triggerScenarios":"Thrown at gateway/server.go:150 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-15T17:31:12.345Z"}