v1.1.52: fix scenario create (drop svcOperationId) + http_client _status debug

This commit is contained in:
2026-07-30 15:51:22 +04:00
parent 6f051aa348
commit 7354d9c125
3 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -105,11 +105,12 @@ class HttpClient:
r = self._session.post(url, json=(data if data is not None else {}), **kwargs)
if not r.ok:
raise Exception(f"POST {path}: {r.status_code} {r.reason}: {r.text[:200]}")
result = {}
result = {"_status": r.status_code}
try:
parsed = r.json()
if isinstance(parsed, dict):
result = parsed
result["_status"] = r.status_code
except Exception:
pass # тело не JSON или не dict — ок, Location всё равно извлечём
loc = r.headers.get("Location", "")