From 6689d3f180558a1fafa7568ebddeeb8e25ad2336 Mon Sep 17 00:00:00 2001 From: Austin Vazquez Date: Fri, 1 Mar 2024 15:29:24 +0000 Subject: [PATCH] Add debug code for failing test on windows Signed-off-by: Austin Vazquez --- client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client.go b/client.go index 26c3dd2a9..887b31a5d 100644 --- a/client.go +++ b/client.go @@ -19,6 +19,7 @@ package ttrpc import ( "context" "errors" + "fmt" "io" "net" "os" @@ -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 ( @@ -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) {