Skip to content

feat(health): add DB + Horizon readiness checks in /health#170

Merged
greatest0fallt1me merged 2 commits intoCreditra:mainfrom
ryzen-xp:feat/Health-check-depth-for-database-and-Horizon
Mar 31, 2026
Merged

feat(health): add DB + Horizon readiness checks in /health#170
greatest0fallt1me merged 2 commits intoCreditra:mainfrom
ryzen-xp:feat/Health-check-depth-for-database-and-Horizon

Conversation

@ryzen-xp
Copy link
Copy Markdown
Contributor

PR Title

feat(health): add DB + Horizon readiness checks in /health

Summary

  • /health now includes dependency readiness
  • checks:
    • DB: DATABASE_URL, connect/query SELECT 1 (1s timeout)
    • Horizon: HORIZON_URL from listener config, HTTP GET (2s timeout)
  • response fields added:
    • ready (true only if both are ok)
    • dependencies.database and dependencies.horizon details
  • existing status fields preserved:
    • status: ok
    • service: creditra-backend

Tests

  • added coverage in:
    • health.test.ts
    • health.test.ts
    • api.test.ts assertion updated
  • run command:
    • npm test (after npm install)
  • health tests pass; integration suite has existing unrelated baseline mismatch in other endpoints (not from /health change)

Notes

@greatest0fallt1me greatest0fallt1me merged commit ce4a399 into Creditra:main Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Health check depth for database and Horizon

2 participants