Sync from dev @ 497baf0

Source: main (497baf0)
Excluded: live tenant exports, generated artifacts, and dev-only tooling.
This commit is contained in:
2026-04-21 22:21:43 +02:00
parent b6ac9524f7
commit 2c41eaca44
25 changed files with 2258 additions and 79 deletions

View File

@@ -114,6 +114,15 @@ def request_json(
except urllib.error.HTTPError as exc:
last_error = exc
if exc.code not in retry_codes or attempt == max_retries:
body = ""
try:
body = exc.read().decode("utf-8", errors="replace")[:2048]
except Exception:
pass
if body:
raise RuntimeError(
f"{method} {url} failed: HTTP Error {exc.code}: {exc.reason}{body}"
) from exc
raise
retry_after = _get_retry_after_seconds(exc)
sleep = retry_after if retry_after is not None else (2 ** attempt)