Handle 404 error for tidal (#623)

This commit is contained in:
Nathan Thomas 2024-02-07 13:22:14 -08:00 committed by GitHub
parent 9d6a2be49e
commit b01382f267
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import time
import aiohttp
from ..config import Config
from ..exceptions import NonStreamableError
from .client import Client
from .downloadable import TidalDownloadable
@ -321,5 +322,8 @@ class TidalClient(Client):
async with self.rate_limiter:
async with self.session.get(f"{BASE}/{path}", params=params) as resp:
if resp.status == 404:
logger.warning("TIDAL: track not found", resp)
raise NonStreamableError("TIDAL: Track not found")
resp.raise_for_status()
return await resp.json()