return a micro error on lookup failure

This commit is contained in:
Asim Aslam 2020-08-09 21:44:39 +01:00 committed by Vasiliy Tolstov
parent 1003b968cf
commit 14743471af

View File

@ -419,7 +419,7 @@ func (g *grpcClient) Call(ctx context.Context, req client.Request, rsp interface
// lookup the route to send the reques to // lookup the route to send the reques to
route, err := client.LookupRoute(req, callOpts) route, err := client.LookupRoute(req, callOpts)
if err != nil { if err != nil {
return err return errors.InternalServerError("go.micro.client", err.Error())
} }
// pass a node to enable backwards compatability as changing the // 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 // lookup the route to send the reques to
route, err := client.LookupRoute(req, callOpts) route, err := client.LookupRoute(req, callOpts)
if err != nil { 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 // pass a node to enable backwards compatability as changing the