feat: add recommendation service adapters
This commit is contained in:
parent
e970bdf542
commit
751391e6a2
9 changed files with 676 additions and 26 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue