feat: implement backend API clients for multi-marketplace integration and frontend service layer
This commit is contained in:
15
backend/wb_api/exceptions.py
Normal file
15
backend/wb_api/exceptions.py
Normal file
@@ -0,0 +1,15 @@
|
||||
class WBAPIError(Exception):
|
||||
"""Base exception for all Wildberries API errors."""
|
||||
pass
|
||||
|
||||
class WBAuthError(WBAPIError):
|
||||
"""Raised when authentication fails (HTTP 401)."""
|
||||
pass
|
||||
|
||||
class WBRateLimitError(WBAPIError):
|
||||
"""Raised when API rate limits are exceeded (HTTP 429)."""
|
||||
pass
|
||||
|
||||
class WBBadRequestError(WBAPIError):
|
||||
"""Raised when API returns HTTP 400 (Bad Request)."""
|
||||
pass
|
||||
Reference in New Issue
Block a user