github GeiserX/Telegram-Archive v7.2.1
v7.2.1 — Database Error Handling

latest releases: v8.0.2, v8.0.1, v8.0.0...
5 months ago

Bug Fixes

  • Login: When the database is unreachable, the login endpoint now falls through to master env var credentials instead of returning a generic "Unexpected error". Viewer-only users see a clear "Database temporarily unavailable" message (HTTP 503).
  • All data endpoints: Connection errors now return HTTP 503 "Database temporarily unavailable" instead of generic HTTP 500 "Internal server error".
  • Audit log resilience: Audit log writes in the login flow are wrapped in try/except so they never crash the response.

New Features

  • Global exception handler: Catches unhandled DB connection errors across all endpoints (including admin) and returns 503.
  • Health endpoint: GET /api/health returns {"status": "ok", "database": "connected"} (200) or {"status": "degraded", "database": "unreachable"} (503). Useful for Docker healthchecks and monitoring.

Internal

  • Added _is_db_connection_error() helper that walks the exception chain looking for OSError (covers socket.gaierror, ConnectionRefusedError, etc.)

Closes #92

Don't miss a new Telegram-Archive release

NewReleases is sending notifications on new releases.