From 0e1d8c4e475b7ce4af0eef1e9af1dee843ac314b Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 16 Mar 2020 13:33:38 +0300 Subject: [PATCH] client/grpc: unwrap error after call (#1352) Signed-off-by: Vasiliy Tolstov --- grpc.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grpc.go b/grpc.go index df1de99..1f92b7c 100644 --- a/grpc.go +++ b/grpc.go @@ -445,10 +445,6 @@ func (g *grpcClient) Call(ctx context.Context, req client.Request, rsp interface // call backoff first. Someone may want an initial start delay t, err := callOpts.Backoff(ctx, req, i) if err != nil { - if verr, ok := err.(*errors.Error); ok { - return verr - } - return errors.InternalServerError("go.micro.client", err.Error()) } @@ -469,6 +465,10 @@ func (g *grpcClient) Call(ctx context.Context, req client.Request, rsp interface // make the call err = gcall(ctx, node, req, rsp, callOpts) + if verr, ok := err.(*errors.Error); ok { + return verr + } + g.opts.Selector.Mark(service, node, err) return err }