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
|
return nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
span.RecordError(err)
|
span.AddEvent(err.Error())
|
||||||
w.WriteHeader(http.StatusNotFound)
|
w.WriteHeader(http.StatusNotFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ func (s *service) getPending(w http.ResponseWriter, r *http.Request, peerID stri
|
||||||
peerResults.SetStreamID(aggPeer(peerID))
|
peerResults.SetStreamID(aggPeer(peerID))
|
||||||
err = s.es.Load(ctx, peerResults)
|
err = s.es.Load(ctx, peerResults)
|
||||||
if err != nil && !errors.Is(err, ev.ErrNotFound) {
|
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)
|
w.WriteHeader(http.StatusNotFound)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -222,7 +222,7 @@ func (s *service) getPending(w http.ResponseWriter, r *http.Request, peerID stri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if req == nil {
|
if req == nil {
|
||||||
span.RecordError(fmt.Errorf("request not found"))
|
span.AddEvent("request not found")
|
||||||
w.WriteHeader(http.StatusNoContent)
|
w.WriteHeader(http.StatusNoContent)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user