diff --git a/web/evotor_api.py b/web/evotor_api.py index fd498db..0d220a9 100644 --- a/web/evotor_api.py +++ b/web/evotor_api.py @@ -33,6 +33,8 @@ async def fetch_groups(access_token: str, store_id: str) -> list[dict]: headers={"Authorization": f"Bearer {access_token}"}, timeout=15, ) + if resp.status_code == 402: + return [] resp.raise_for_status() data = resp.json() items = data.get("items", data) if isinstance(data, dict) else data @@ -46,6 +48,8 @@ async def fetch_products(access_token: str, store_id: str) -> list[dict]: headers={"Authorization": f"Bearer {access_token}"}, timeout=15, ) + if resp.status_code == 402: + return [] resp.raise_for_status() data = resp.json() items = data.get("items", data) if isinstance(data, dict) else data