feat: implement backend API clients for multi-marketplace integration and frontend service layer
This commit is contained in:
19
backend/mm_api/exceptions.py
Normal file
19
backend/mm_api/exceptions.py
Normal file
@@ -0,0 +1,19 @@
|
||||
class MMAPIError(Exception):
|
||||
"""Base exception for all Magnit Market API errors."""
|
||||
pass
|
||||
|
||||
class MMAuthError(MMAPIError):
|
||||
"""Raised when authentication fails (HTTP 401 or 403)."""
|
||||
pass
|
||||
|
||||
class MMRateLimitError(MMAPIError):
|
||||
"""Raised when API rate limits are exceeded (HTTP 429)."""
|
||||
pass
|
||||
|
||||
class MMBadRequestError(MMAPIError):
|
||||
"""Raised when API returns HTTP 400 (Bad Request)."""
|
||||
pass
|
||||
|
||||
class MMNotFoundError(MMAPIError):
|
||||
"""Raised when API returns HTTP 404 (Not Found)."""
|
||||
pass
|
||||
Reference in New Issue
Block a user