From bd98115c74729d8d5e4e90955a7118e66f1d5885 Mon Sep 17 00:00:00 2001 From: PatrickMenoti <82882574+PatrickMenoti@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:29:32 -0300 Subject: [PATCH] refactor: check for error not nil --- utils/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/helpers.go b/utils/helpers.go index b790ee466..ee14393a8 100644 --- a/utils/helpers.go +++ b/utils/helpers.go @@ -291,7 +291,7 @@ func ErrorPerStatusCode(httpResp *http.Response, err error) error { // checks varying errors that may occur when status code is 500 func checkStatusCode500Error(err error) error { - if strings.Contains(err.Error(), "Client.Timeout") { + if err != nil && strings.Contains(err.Error(), "Client.Timeout") { return ErrorTimeoutAPICall }