Skip to content

Commit

Permalink
Merge pull request #46 from thaJeztah/adjust_for_grpc_1.23
Browse files Browse the repository at this point in the history
Client.Call(): do not return error if no Status is set (gRPC v1.23 and up)
  • Loading branch information
dmcgowan committed Aug 26, 2019
2 parents f969a7f + 17f4d32 commit 1ab4dfb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1ab4dfb

Please sign in to comment.