From 14743471afad464bff8c3cdc5727c0afa9817508 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Sun, 9 Aug 2020 21:44:39 +0100 Subject: [PATCH] return a micro error on lookup failure --- grpc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grpc.go b/grpc.go index 98d40f5..b7287b3 100644 --- a/grpc.go +++ b/grpc.go @@ -419,7 +419,7 @@ func (g *grpcClient) Call(ctx context.Context, req client.Request, rsp interface // lookup the route to send the reques to route, err := client.LookupRoute(req, callOpts) if err != nil { - return err + return errors.InternalServerError("go.micro.client", err.Error()) } // pass a node to enable backwards compatability as changing the @@ -527,7 +527,7 @@ func (g *grpcClient) Stream(ctx context.Context, req client.Request, opts ...cli // lookup the route to send the reques to route, err := client.LookupRoute(req, callOpts) if err != nil { - return nil, err + return nil, errors.InternalServerError("go.micro.client", err.Error()) } // pass a node to enable backwards compatability as changing the