From 9da259900c90fb75c5b0b137e70a50d39ae59ae3 Mon Sep 17 00:00:00 2001 From: VivianDee <115420678+VivianDee@users.noreply.github.com> Date: Fri, 10 Oct 2025 16:21:28 +0100 Subject: [PATCH] [add]: DB URI --- app/api/routes/routes.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/api/routes/routes.py b/app/api/routes/routes.py index f7a3517..2bf06c5 100644 --- a/app/api/routes/routes.py +++ b/app/api/routes/routes.py @@ -118,7 +118,6 @@ def notification_callback(): response = NotificationCallbackService.process_request(data) return response - # Health Check Endpoint @api.route("/health", methods=["GET"]) def health_check(): @@ -129,6 +128,15 @@ def health_check(): errors = [] status = "ok" + + # Extract the database URI + try: + db_uri = db.engine.url.render_as_string(hide_password=False) + db_uri = db_uri + except Exception as e: + db_uri = "Unavailable" + + # Check database connection try: logger.info(f"Database Health == : {SQLALCHEMY_DATABASE_URI}") @@ -159,6 +167,7 @@ def health_check(): "status": status, "db_status": db_status, "events_service_status": events_service_status, + "db_uri": db_uri, "errors": errors or None }