From 04b80892a6f9813e1bddf4f26db79cd5affe62e2 Mon Sep 17 00:00:00 2001 From: Qi Zhao Date: Fri, 2 Oct 2015 14:07:05 -0700 Subject: [PATCH] Revert "fix difference between unitary and stream codec error handling" --- rpc_util.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rpc_util.go b/rpc_util.go index 7410c50b..21a4a15a 100644 --- a/rpc_util.go +++ b/rpc_util.go @@ -187,11 +187,8 @@ 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) - } + return Errorf(codes.Internal, "grpc: %v", err) + } default: return Errorf(codes.Internal, "gprc: compression is not supported yet.") }