From f82c0e0d9005691fc09c2a6866cf1a61d25af248 Mon Sep 17 00:00:00 2001 From: Rico Date: Sun, 2 Apr 2023 03:59:26 +0200 Subject: [PATCH] fix: use proper count for 429 response codes --- internal/geizhals/download.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/geizhals/download.go b/internal/geizhals/download.go index 1825314..b0b5862 100644 --- a/internal/geizhals/download.go +++ b/internal/geizhals/download.go @@ -82,7 +82,7 @@ func downloadHTML(entityURL string) (*goquery.Document, int, error) { // Cleanup when this function ends defer resp.Body.Close() - if resp.StatusCode != http.StatusTooManyRequests { + if resp.StatusCode == http.StatusTooManyRequests { prometheus.HTTPRequests429.Inc() } if resp.StatusCode != http.StatusOK {