This commit is contained in:
iamqizhao
2015-10-02 13:30:47 -07:00

View File

@ -187,6 +187,9 @@ func recv(p *parser, c Codec, m interface{}) error {
switch pf {
case compressionNone:
if err := c.Unmarshal(d, m); err != nil {
if rErr, ok := err.(rpcError); ok {
return rErr
} else {
return Errorf(codes.Internal, "grpc: %v", err)
}
default: