forked from mtusi2026/mtusi2026lab7
Развести стенд с соседними лабораторными и починить хранилища.
Seaweed без TLS остаётся во внутренней сети, Grafana и S3 публикуются на свободных портах, а sidecar брокера поднимается заново после рестарта RabbitMQ.
This commit is contained in:
@@ -39,7 +39,13 @@ def call(method: str, path: str, body: dict | None = None, token: str = "", acce
|
||||
raw = exc.read()
|
||||
code = exc.code
|
||||
if code not in accept:
|
||||
raise SystemExit("OpenBao %s %s failed with HTTP %s" % (method, path, code))
|
||||
detail = "unparsed"
|
||||
try:
|
||||
parsed = json.loads(raw.decode("utf-8"))
|
||||
detail = " ".join(parsed.get("errors") or [])[:300]
|
||||
except (json.JSONDecodeError, UnicodeError, AttributeError):
|
||||
detail = "unparsed"
|
||||
raise SystemExit("OpenBao %s %s failed with HTTP %s: %s" % (method, path, code, detail))
|
||||
if not raw:
|
||||
return code, {}
|
||||
return code, json.loads(raw.decode("utf-8"))
|
||||
|
||||
Reference in New Issue
Block a user