Skip to content

Commit

Permalink
Error message returned if the track is locked
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamario Rankins committed Aug 13, 2019
1 parent 4ad01b1 commit 2bfd6c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ func newDownload(flags *pflag.FlagSet, usrCfg *viper.Viper) (*download, error) {
if err := json.NewDecoder(res.Body).Decode(&d.payload); err != nil {
return nil, decodedAPIError(res)
}
if d.payload.Error.Message != "" {
return nil, errors.New(d.payload.Error.Message)
}

return d, nil
}
Expand Down

0 comments on commit 2bfd6c8

Please sign in to comment.