diff --git a/client.go b/client.go index 9db15fe69..bdc01b5b0 100644 --- a/client.go +++ b/client.go @@ -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 {