commit
92c8520ef9
@ -29,6 +29,7 @@ import (
|
|||||||
"github.com/gogo/protobuf/proto"
|
"github.com/gogo/protobuf/proto"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -134,10 +135,9 @@ func (c *Client) Call(ctx context.Context, service, method string, req, resp int
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if cresp.Status != nil {
|
if cresp.Status != nil && cresp.Status.Code != int32(codes.OK) {
|
||||||
return status.ErrorProto(cresp.Status)
|
return status.ErrorProto(cresp.Status)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user