fix: remove non-errors
All checks were successful
Go Bump / bump (push) Successful in 47s
Go Test / test (push) Successful in 59s
Deploy / deploy (push) Successful in 1m42s

This commit is contained in:
xuu 2023-10-07 18:33:00 -06:00
parent a3ee0b7900
commit cd1f1d7b5f
Signed by: xuu
GPG Key ID: 8B3B0604F164E04F

View File

@ -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
}