Skip to content

Commit

Permalink
Handle a previously unhandled error
Browse files Browse the repository at this point in the history
  • Loading branch information
royvandewater committed Jun 4, 2018
1 parent 7443e59 commit eea67f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ func query(cmd *cobra.Command, args []string) {
log.Fatal(err)
}

b, _ := json.MarshalIndent(resp, "", " ")
b, err := json.MarshalIndent(resp, "", " ")
if err != nil {
log.Fatalln("Could not parse graphql response", err.Error())
}
fmt.Print("Result: \n\n")
fmt.Println(string(b))
}

0 comments on commit eea67f0

Please sign in to comment.