Skip to content

Commit

Permalink
Adds error on request failure
Browse files Browse the repository at this point in the history
  • Loading branch information
tomnomnom committed Jan 2, 2018
1 parent 0fb57ac commit 95434c8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ func main() {
continue
}

if res.err != nil {
fmt.Fprintf(os.Stderr, "request failed: %s\n", res.err)
continue
}

path, err := res.save(c.output)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to save file: %s\n", err)
Expand Down

0 comments on commit 95434c8

Please sign in to comment.