feat: add recommendation service adapters

This commit is contained in:
Justin Visser 2026-08-10 12:05:59 +02:00
parent e970bdf542
commit 751391e6a2
9 changed files with 676 additions and 26 deletions

View file

@ -1,5 +1,7 @@
"""Typed failures raised by the Spotify adapter."""
from app.ports.protocols import CatalogQuotaExhaustedError
class SpotifyError(Exception):
"""Base class for Spotify adapter failures."""
@ -9,7 +11,7 @@ class SpotifyAuthenticationError(SpotifyError):
"""Spotify rejected authentication or token refresh."""
class SpotifyRateLimitedError(SpotifyError):
class SpotifyRateLimitedError(SpotifyError, CatalogQuotaExhaustedError):
"""Spotify rate limited a request that could not be retried."""
def __init__(self, retry_after_seconds: float | None, reason: str | None = None) -> None: