Skip to content

Commit 1e2c07f

Browse files
committed
raise exception if body can't be decoded (unlikely)
1 parent a899d8f commit 1e2c07f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ytmusicapi/mixins/browsing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,8 @@ def get_album_browse_id(self, audioPlaylistId: str) -> Optional[str]:
482482

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

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

0 commit comments

Comments
 (0)