From f4b8fbc997a00a44b4b47129e6d27f92ae2a1c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D1=88=D0=BA=D0=BE=D0=B2=20=D0=94=D0=BC=D0=B8?= =?UTF-8?q?=D1=82=D1=80=D0=B8=D0=B9?= Date: Mon, 16 Sep 2024 02:02:31 +0300 Subject: [PATCH] fix --- internal/client/order.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/client/order.go b/internal/client/order.go index 32ec570..d2e678b 100644 --- a/internal/client/order.go +++ b/internal/client/order.go @@ -16,7 +16,7 @@ func CheckOrder(OrderNum string) (services.OrderFromAccrual, int, error) { if err != nil { return data, 0, err } - if resp.StatusCode != http.StatusTooManyRequests { + if resp.StatusCode == http.StatusTooManyRequests { retryAfter := resp.Header.Get("Retry-After") seconds, err := strconv.Atoi(retryAfter) if err != nil {