From 2bcd4787efc970902d5e7156d087838359e74d88 Mon Sep 17 00:00:00 2001 From: hanemile Date: Wed, 29 Jul 2020 22:32:04 +0200 Subject: printing a bit more stuff in case of an error --- main.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index fa7eda7..466ee21 100644 --- a/main.go +++ b/main.go @@ -90,6 +90,8 @@ func fetchAllChallenges() (Challenges, error) { // unmarshal the resulting json into a Challenges struct var challenges Challenges if err := json.Unmarshal(res.Bytes(), &challenges); err != nil { + fmt.Printf("Challenge unmarshal error: %d\n", res.StatusCode) + fmt.Println(res.String()) return Challenges{}, err } fmt.Println("Done fetching all challenges") -- cgit 1.4.1