Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

BUG: Health check always reports API status for DB — /hc_api called twice in api_helper #135

Closed

Description

@Xarlos89

Description

The health_check() method in src/bot/core/api_helper.py calls /hc_api twice. The second call should hit /hc_db to check the database.

Location

src/bot/core/api_helper.py lines 29–32:

async with session.get(f"{self.api}/hc_api") as response:
    results["api_status"] = await response.json()
async with session.get(f"{self.api}/hc_api") as response:  # <-- should be /hc_db
    results["db_status"] = await response.json()

The /hc_db route exists in src/api/routes/healthchecks.py (line 24) but is never called.

Fix

async with session.get(f"{self.api}/hc_db") as response:
    results["db_status"] = await response.json()

Impact

The >hc command always shows the API status in both fields. A DB outage would go undetected by the healthcheck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issuehelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions