From ae28c4911ffd48bd97177ee3a9f107406b739501 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Mon, 27 Feb 2023 18:44:01 -0500 Subject: [PATCH] check error --- pkg/isoclient/isoclient.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/isoclient/isoclient.go b/pkg/isoclient/isoclient.go index 1e33a4e..f98aa00 100644 --- a/pkg/isoclient/isoclient.go +++ b/pkg/isoclient/isoclient.go @@ -53,6 +53,10 @@ func (c *client) makeRequest(endpoint string, into interface{}) error { client := http.Client{} resp, err := client.Do(req) + if err != nil { + return err + } + if resp.StatusCode != http.StatusOK { return errors.New("non 2xx response") }