Remove try/except around page registry build
This was silently masking the str.format() braces bug. If page registry building fails, it should crash visibly, not serve a broken page with 0 routes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -754,13 +754,8 @@ def sx_page(ctx: dict, page_sx: str, *,
|
|||||||
styles_json = _build_style_dict_json()
|
styles_json = _build_style_dict_json()
|
||||||
|
|
||||||
# Page registry for client-side routing
|
# Page registry for client-side routing
|
||||||
pages_sx = ""
|
from quart import current_app
|
||||||
try:
|
pages_sx = _build_pages_sx(current_app.name)
|
||||||
from quart import current_app
|
|
||||||
pages_sx = _build_pages_sx(current_app.name)
|
|
||||||
except Exception as e:
|
|
||||||
import logging
|
|
||||||
logging.getLogger("sx").warning("Failed to build page registry: %s", e)
|
|
||||||
|
|
||||||
return _SX_PAGE_TEMPLATE.format(
|
return _SX_PAGE_TEMPLATE.format(
|
||||||
title=_html_escape(title),
|
title=_html_escape(title),
|
||||||
|
|||||||
Reference in New Issue
Block a user