From 7817ea6b8bf72000d55b5e8a1f18cda5d91c33c2 Mon Sep 17 00:00:00 2001 From: wei liu Date: Thu, 21 Nov 2024 15:10:32 +0800 Subject: [PATCH] enhance: Remove unnecessary stack trace in error (#37816) Signed-off-by: Wei Liu --- internal/util/mock/grpcclient.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/util/mock/grpcclient.go b/internal/util/mock/grpcclient.go index 5ffa9d8bd7..4da362c881 100644 --- a/internal/util/mock/grpcclient.go +++ b/internal/util/mock/grpcclient.go @@ -124,9 +124,8 @@ func (c *GRPCClientBase[T]) Call(ctx context.Context, caller func(client T) (any ret, err := c.callOnce(ctx, caller) if err != nil { - traceErr := fmt.Errorf("err: %s\n, %s", err.Error(), tracer.StackTrace()) - log.Error("GRPCClientBase[T] Call grpc first call get error ", zap.Error(traceErr)) - return nil, traceErr + log.Error("GRPCClientBase[T] Call grpc first call get error ", zap.Error(err)) + return nil, err } return ret, err }