sofastack / sofa-rpc-node

SOFARPC Node is a high-performance, high-extensibility, production-level Nodejs RPC framework.
MIT License
612 stars 64 forks source link

client无法获取服务端返回的metadata数据 #98

Open T-Q-T opened 2 years ago

T-Q-T commented 2 years ago

需求:客户端能够获取服务端返回的meta信息 在client端,直接抛出了最终的res.data的结果,而没抛出其中的res.meta

T-Q-T commented 2 years ago

https://github.com/sofastack/sofa-rpc-node/blob/1921e7d96bac3f78bb3c6e52719856feb8cbc12f/lib/client/connection/grpc/index.js#L152 在客户端接收服务端信息这里,直接将返回的请求体暴露出去,而不提供meta信息,希望能够获取服务端发送回来的meta信息

mansonchor commented 2 years ago

meta 是 client - server 通讯感知的,并不是业务感知的,不应该返回给上层业务的