From a8b8a557f7a3ae50a276e849dd1ad0b4198bcbb3 Mon Sep 17 00:00:00 2001 From: Antoni Sawicki Date: Tue, 2 Jul 2024 02:57:00 -0700 Subject: [PATCH] add error to http status? --- txt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/txt.go b/txt.go index 2df463a..79d6090 100644 --- a/txt.go +++ b/txt.go @@ -95,7 +95,7 @@ func fetchImage(id, url string) error { return fmt.Errorf("Error downloading %q: %v", url, err) } if r.StatusCode != http.StatusOK { - return fmt.Errorf("%q status code: %v", url, r.StatusCode) + return fmt.Errorf("Error %q HTTP Status Code: %v", url, r.StatusCode) } defer r.Body.Close() img, err = io.ReadAll(r.Body)