diff --git a/shared/browser/app/errors.py b/shared/browser/app/errors.py index 379381a..7cb2c3a 100644 --- a/shared/browser/app/errors.py +++ b/shared/browser/app/errors.py @@ -94,6 +94,12 @@ async def _rich_error_page(errnum: str, message: str, image: str | None = None) except Exception: ctx = {"base_title": "Rose Ash", "asset_url": "/static"} + # Inject Jinja globals (blog_url, cart_url, etc.) — these are + # needed by call_url() for cross-subdomain links. + for key, val in current_app.jinja_env.globals.items(): + if key not in ctx: + ctx[key] = val + # Try to fetch fragments, but don't fail if they're unreachable try: from shared.infrastructure.fragments import fetch_fragments