about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhanemile <mail@emile.space>2020-07-29 22:32:04 +0200
committerhanemile <mail@emile.space>2020-07-29 22:32:04 +0200
commit2bcd4787efc970902d5e7156d087838359e74d88 (patch)
treebd17728528e3c9aadae4b53934dd5dfda048d418
parent5d2c1c885d8d9cfd1a5d21aa5b4e14e27e904bd7 (diff)
printing a bit more stuff in case of an error
-rw-r--r--main.go2
1 files changed, 2 insertions, 0 deletions
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")