fix(health): answer 503 when MongoDB does not answer (#60) #822

Merged
sharang merged 1 commits from fix/health-db-ping into main 2026-11-04 08:17:16 +00:00
1 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 37d1737b17 fix(health): answer 503 when MongoDB does not answer (#60)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Agent integration (pull_request) Successful in 4m14s
CI / Check (pull_request) Successful in 17m31s
GET /api/v1/health answered ok unconditionally, so the container health
check and a load balancer kept an instance that could not reach its
database. It now pings MongoDB (2 s timeout): 200 {"status":"ok"} when
it answers, 503 {"status":"degraded","mongo":"unreachable"} when not.

Closes #60.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 08:59:28 +01:00