Merge pull request #46 from thaJeztah/adjust_for_grpc_1.23

Client.Call(): do not return error if no Status is set (gRPC v1.23 and up)
This commit is contained in:
Derek McGowan
2019-08-26 14:00:47 -07:00
committed by GitHub

View File

@@ -134,11 +134,11 @@ 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 {
return errors.New("no status provided on response") return status.ErrorProto(cresp.Status)
} }
return status.ErrorProto(cresp.Status) return nil
} }
func (c *Client) dispatch(ctx context.Context, req *Request, resp *Response) error { func (c *Client) dispatch(ctx context.Context, req *Request, resp *Response) error {