mirror of
https://github.com/prometheus/prometheus
synced 2024-12-25 16:02:28 +00:00
Merge pull request #13335 from nmdanny/patch-1
remote: consider storage.ErrTooOldSample as non-retryable by returning 400
This commit is contained in:
commit
6d2e0a7424
@ -68,7 +68,7 @@ func (h *writeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
err = h.write(r.Context(), req)
|
||||
switch {
|
||||
case err == nil:
|
||||
case errors.Is(err, storage.ErrOutOfOrderSample), errors.Is(err, storage.ErrOutOfBounds), errors.Is(err, storage.ErrDuplicateSampleForTimestamp):
|
||||
case errors.Is(err, storage.ErrOutOfOrderSample), errors.Is(err, storage.ErrOutOfBounds), errors.Is(err, storage.ErrDuplicateSampleForTimestamp), errors.Is(err, storage.ErrTooOldSample):
|
||||
// Indicated an out of order sample is a bad request to prevent retries.
|
||||
http.Error(w, err.Error(), http.StatusBadRequest)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user