Skip to content

Commit

Permalink
Add debug code for failing test on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Vazquez <[email protected]>
  • Loading branch information
austinvazquez committed Mar 1, 2024
1 parent a5aee16 commit 6689d3f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package ttrpc
import (
"context"
"errors"
"fmt"
"io"
"net"
"os"
Expand Down Expand Up @@ -105,7 +106,7 @@ type callRequest struct {
func (c *Client) Call(ctx context.Context, service, method string, req, resp interface{}) error {
payload, err := c.codec.Marshal(req)
if err != nil {
return err
return fmt.Errorf("marshal error: %v", err)
}

var (
Expand All @@ -130,11 +131,11 @@ func (c *Client) Call(ctx context.Context, service, method string, req, resp int
FullMethod: fullPath(service, method),
}
if err := c.interceptor(ctx, creq, cresp, info, c.dispatch); err != nil {
return err
return fmt.Errorf("interceptor error: %v", err)
}

if err := c.codec.Unmarshal(cresp.Payload, resp); err != nil {
return err
return fmt.Errorf("unmarshal error: %v", err)
}

if cresp.Status != nil && cresp.Status.Code != int32(codes.OK) {
Expand Down

0 comments on commit 6689d3f

Please sign in to comment.