diff --git a/jobs/download-character-images/download-character-images.go b/jobs/download-character-images/download-character-images.go index b1060a2c..38485e33 100644 --- a/jobs/download-character-images/download-character-images.go +++ b/jobs/download-character-images/download-character-images.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "net/http" "sort" "time" @@ -52,6 +53,11 @@ func download(characterID string) { return } + if response.StatusCode() != http.StatusOK { + color.Red("Status: %d", response.StatusCode()) + return + } + err = character.SetImageBytes(response.Bytes()) if err != nil {