Skip to content

Commit 2bfd6c8

Browse files
author
Jamario Rankins
committed
Error message returned if the track is locked
1 parent 4ad01b1 commit 2bfd6c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/download.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ func newDownload(flags *pflag.FlagSet, usrCfg *viper.Viper) (*download, error) {
188188
if err := json.NewDecoder(res.Body).Decode(&d.payload); err != nil {
189189
return nil, decodedAPIError(res)
190190
}
191+
if d.payload.Error.Message != "" {
192+
return nil, errors.New(d.payload.Error.Message)
193+
}
191194

192195
return d, nil
193196
}

0 commit comments

Comments
 (0)