From cd1f1d7b5f5815a73fada849154b3d4303012bc6 Mon Sep 17 00:00:00 2001 From: xuu Date: Sat, 7 Oct 2023 18:33:00 -0600 Subject: [PATCH] fix: remove non-errors --- app/peerfinder/http.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/peerfinder/http.go b/app/peerfinder/http.go index 03c694b..7776434 100644 --- a/app/peerfinder/http.go +++ b/app/peerfinder/http.go @@ -179,7 +179,7 @@ func (s *service) getPending(w http.ResponseWriter, r *http.Request, peerID stri return nil }) if err != nil { - span.RecordError(err) + span.AddEvent(err.Error()) w.WriteHeader(http.StatusNotFound) return } @@ -204,7 +204,7 @@ func (s *service) getPending(w http.ResponseWriter, r *http.Request, peerID stri peerResults.SetStreamID(aggPeer(peerID)) err = s.es.Load(ctx, peerResults) if err != nil && !errors.Is(err, ev.ErrNotFound) { - span.RecordError(fmt.Errorf("peer not found: %w", err)) + span.AddEvent("peer not found") w.WriteHeader(http.StatusNotFound) return } @@ -222,7 +222,7 @@ func (s *service) getPending(w http.ResponseWriter, r *http.Request, peerID stri } } if req == nil { - span.RecordError(fmt.Errorf("request not found")) + span.AddEvent("request not found") w.WriteHeader(http.StatusNoContent) return }