From fc39c396c87ccc7bca939a9a4e55cb8607940747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?France=CC=81=20Wilke?= <francewilke@gmail.com> Date: Wed, 13 Jul 2022 11:41:58 +0200 Subject: [PATCH] Don't retry if no http code --- errors/error.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/errors/error.go b/errors/error.go index 90e30bb..bb14c1d 100644 --- a/errors/error.go +++ b/errors/error.go @@ -248,6 +248,10 @@ func IsRetryableError(err error) bool { code := HTTPCode(err) + if code == 0 { + return false + } + // 429 should always retry if code == http.StatusTooManyRequests { return true -- GitLab