From 9dff0a251007537adf9b5fdf72e944e8d610c0d7 Mon Sep 17 00:00:00 2001 From: Manan Gupta Date: Thu, 29 Aug 2024 21:07:25 +0530 Subject: [PATCH] feat: fix another usage fmt.Errorf Signed-off-by: Manan Gupta --- go/vt/vttablet/tabletserver/connpool/dbconn.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/vt/vttablet/tabletserver/connpool/dbconn.go b/go/vt/vttablet/tabletserver/connpool/dbconn.go index 531108b2348..2ee514eb2de 100644 --- a/go/vt/vttablet/tabletserver/connpool/dbconn.go +++ b/go/vt/vttablet/tabletserver/connpool/dbconn.go @@ -235,7 +235,7 @@ func (dbc *Conn) FetchNext(ctx context.Context, maxrows int, wantfields bool) (* // Check if the context is already past its deadline before // trying to fetch the next result. if err := ctx.Err(); err != nil { - return nil, fmt.Errorf("%v before reading next result set", err) + return nil, vterrors.Errorf(vtrpcpb.Code_CANCELED, "%s, before reading next result set", dbc.getErrorMessageFromContextError(ctx)) } res, _, _, err := dbc.conn.ReadQueryResult(maxrows, wantfields) if err != nil {