Skip to content

Commit

Permalink
Fix returning proper error message when unable to retrieve playlist t…
Browse files Browse the repository at this point in the history
…racks
  • Loading branch information
jdemaeyer committed Apr 9, 2024
1 parent 861a283 commit 60c291d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spoqify/anonymization.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ async def anonymize_playlist(playlist_id, station=False):
# Spotify app? We will assume here that the user still prefers
# this over their own personalization.
data = await load_api_playlist(playlist_id)
if not data['tracks']:
raise Rejected("Unable to retrieve tracks. Probably a daylist?")
app.logger.debug(
"Found %d tracks for playlist %s",
len(data['tracks']), playlist_id)
Expand Down

0 comments on commit 60c291d

Please sign in to comment.