Fix POST returning empty JSON body, v1.0.8

This commit is contained in:
2026-07-24 08:18:18 +04:00
parent 098cc2ace6
commit d91b3cc446
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -20,4 +20,7 @@ class HttpClient:
kwargs.setdefault("timeout", 30)
r = self._session.post(f"{self._endpoint}{path}", json=data, **kwargs)
r.raise_for_status()
return r.json()
try:
return r.json()
except Exception:
return {}