Make missing frontend files non-fatal: log an error and serve the placeholder page instead of raising during lifespan startup

This commit is contained in:
2026-08-31 18:48:27 +00:00
parent d5e94a2186
commit 9c51b89226
+5 -2
View File
@@ -114,8 +114,11 @@ class Frontend:
"""Load static files from disk with compression."""
www: dict[str, tuple[bytes, bytes | None, dict]] = {}
if not self.base.exists():
msg = f"Frontend folder {self.base} not found (try uv build)"
raise ValueError(msg)
logger.error(
"Missing %s - no frontend (try uv build)",
self.base,
)
else:
paths = [PurePath()]
while paths:
current = self.base / paths.pop(0)