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:
commit
1ab4dfb4c9
@ -134,11 +134,11 @@ func (c *Client) Call(ctx context.Context, service, method string, req, resp int
|
||||
return err
|
||||
}
|
||||
|
||||
if cresp.Status == nil {
|
||||
return errors.New("no status provided on response")
|
||||
if cresp.Status != nil {
|
||||
return status.ErrorProto(cresp.Status)
|
||||
}
|
||||
|
||||
return status.ErrorProto(cresp.Status)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Client) dispatch(ctx context.Context, req *Request, resp *Response) error {
|
||||
|
Loading…
Reference in New Issue
Block a user