From ee4b0de1444f73604bb52eee2e66d198aaf165db Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Wed, 29 Jul 2026 23:25:56 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20/health/ready=20status=20mapping=20(up/d?= =?UTF-8?q?own=20=E2=86=92=20ok/fail)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/routes/health.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/routes/health.py b/app/routes/health.py index bfb9eb3..92798b1 100644 --- a/app/routes/health.py +++ b/app/routes/health.py @@ -55,7 +55,12 @@ async def health_ready() -> ReadyResponse: # health is a dict (or HealthResponse), handle both health_checks = health.get('checks', {}) if isinstance(health, dict) else (health.checks or {}) for check_name, check_val in health_checks.items(): - status = "ok" if check_val == "ok" or check_val is True else "fail" + # Handle both string status and dict with status key + if isinstance(check_val, dict): + status_val = check_val.get("status", "unknown") + else: + status_val = str(check_val) + status = "ok" if status_val in ("ok", "up", "healthy", "true", "True") else "fail" checks[check_name] = status if status != "ok": all_ready = False