From 19a2784b7f65289847d5c382b663254def2a73e0 Mon Sep 17 00:00:00 2001 From: abhishek9686 Date: Fri, 22 Mar 2024 09:50:09 +0700 Subject: [PATCH] ignore bad gateway, retry later on license validation --- pro/license.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pro/license.go b/pro/license.go index de04f902f..633728d14 100644 --- a/pro/license.go +++ b/pro/license.go @@ -246,7 +246,7 @@ func validateLicenseKey(encryptedData []byte, publicKey *[32]byte) ([]byte, bool slog.Warn(err.Error()) // try to use cache if we had a temporary error - if code == http.StatusServiceUnavailable || code == http.StatusGatewayTimeout { + if code == http.StatusServiceUnavailable || code == http.StatusGatewayTimeout || code == http.StatusBadGateway { slog.Warn("Netmaker API may be down, will retry later...", "code", code) return nil, true, nil }