From d224df799b8046b28ec1ec76997d3e55ec5341ba Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Wed, 1 Jul 2026 00:38:38 -0700 Subject: [PATCH] chore(assets): log when assets disabled due to missing DB deps Addresses CodeRabbit review: the missing-optional-dependency fallback in setup_database() silently disabled the assets system with no startup message, unlike the exception path which logs. Add a warning so operators can tell why /api/assets/* returns 503. --- main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/main.py b/main.py index 0a2aaefc7..d3f79687e 100644 --- a/main.py +++ b/main.py @@ -464,6 +464,7 @@ def setup_database(): # Optional DB dependencies are missing, so init_db() is skipped and the # asset backend has no database. Disable assets so /api/assets/* returns # a clean 503 instead of 500s against an uninitialized DB. + logging.warning("Optional database dependencies are missing; assets system disabled.") disable_assets_routes() asset_seeder.disable() except Exception as e: