From b8983ce55212c58935a2d294ed631c808d643cff Mon Sep 17 00:00:00 2001 From: vdaas-ci <57942646+vdaas-ci@users.noreply.github.com> Date: Wed, 30 Oct 2024 16:27:11 +0900 Subject: [PATCH] fix not found error (#2726) (#2727) Co-authored-by: datelier <57349093+datelier@users.noreply.github.com> --- pkg/gateway/lb/handler/grpc/handler.go | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkg/gateway/lb/handler/grpc/handler.go b/pkg/gateway/lb/handler/grpc/handler.go index 740422e4f6..86148e7ede 100644 --- a/pkg/gateway/lb/handler/grpc/handler.go +++ b/pkg/gateway/lb/handler/grpc/handler.go @@ -1904,13 +1904,12 @@ func (s *server) MultiUpdate( } if errs != nil { - st, _ := status.FromError(err) + st, _ := status.FromError(errs) if st != nil && span != nil { - span.RecordError(err) + span.RecordError(errs) span.SetAttributes(trace.FromGRPCStatus(st.Code(), st.Message())...) - span.SetStatus(trace.StatusError, err.Error()) + span.SetStatus(trace.StatusError, errs.Error()) } - errs = err } return locs, errs @@ -2735,13 +2734,12 @@ func (s *server) MultiRemove( } if errs != nil { - st, _ := status.FromError(err) + st, _ := status.FromError(errs) if st != nil && span != nil { - span.RecordError(err) + span.RecordError(errs) span.SetAttributes(trace.FromGRPCStatus(st.Code(), st.Message())...) - span.SetStatus(trace.StatusError, err.Error()) + span.SetStatus(trace.StatusError, errs.Error()) } - errs = err } return locs, errs