diff --git a/app/api/routes/routes.py b/app/api/routes/routes.py index 6a3ec5d..2acfe4e 100644 --- a/app/api/routes/routes.py +++ b/app/api/routes/routes.py @@ -121,9 +121,10 @@ def notification_callback(): def health_check(): - response = {"status": "ok"} + response = {} db_status = "Connect Successful" error = None + status = "ok" try: # Simple query to validate DB connection @@ -131,7 +132,9 @@ def health_check(): except Exception as e: db_status = "Connection Failed" error = str(e) + status = "failed" + response["status"] = status response["db_status"] = db_status if error: response["error"] = error