From 50933f2cc363d7d912c73a6326005cf04ddcec31 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Tue, 9 Jan 2024 08:42:46 -0300 Subject: [PATCH] fix: secondary rate limit --- github_errors/secondary_rate_limit.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/github_errors/secondary_rate_limit.go b/github_errors/secondary_rate_limit.go index 2e7e5ed..7004f89 100644 --- a/github_errors/secondary_rate_limit.go +++ b/github_errors/secondary_rate_limit.go @@ -26,9 +26,10 @@ func IsSecondaryRateLimitError(r *github.Response) (bool, *SecondaryRateLimitErr var body *SecondaryRateLimitBody res := r.Response - if isRateLimit, b := isSecondaryRateLimit(res); !isRateLimit { + isRateLimit, b := isSecondaryRateLimit(res) + if !isRateLimit { return false, nil - } + } body = b retryAfter := parseSecondaryLimitTime(res)