fix: remove non-errors
This commit is contained in:
parent
a3ee0b7900
commit
cd1f1d7b5f
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user