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 }