Skip to content

Commit

Permalink
raise exception if body can't be decoded (unlikely)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ousret committed Oct 17, 2024
1 parent a899d8f commit 1e2c07f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ytmusicapi/mixins/browsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,8 @@ def get_album_browse_id(self, audioPlaylistId: str) -> Optional[str]:

# the server sent nothing or content cannot be decoded
if decoded_body is None:
return None
# this is unlikely. only defensive.
raise YTMusicError("Unable to read response body (album_browse_id)")

decoded = decoded_body.encode("utf8").decode("unicode_escape")

Expand Down

0 comments on commit 1e2c07f

Please sign in to comment.