grpc client error fix (#1351)

Co-authored-by: Ben Toogood <ben@micro.mu>
This commit is contained in:
ben-toogood 2020-03-16 09:53:15 +00:00 committed by Vasiliy Tolstov
parent 4f5a19bf30
commit 284a4ee0a3

View File

@ -445,6 +445,10 @@ 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())
}