fix: protectionGroups is v13+ only — handle 400 gracefully

This commit is contained in:
2026-06-10 13:53:58 +07:00
parent c5294ec754
commit ea3f13f51f

View File

@@ -296,7 +296,10 @@ class VeeamClient:
async def fetch_protection_groups(self) -> list[dict]:
if self._is_v12():
return await self._fetch_json_list("/api/v1/agents/protectionGroups")
try:
return await self._fetch_json_list("/api/v1/agents/protectionGroups")
except Exception:
return []
return []
async def fetch_agent_policies(self) -> list[dict]: