Fail unresolved component renders with HTTP 500

This commit is contained in:
udo
2026-07-18 16:55:42 +00:00
parent 39d4b41e2b
commit 3cbe6f50d4
5 changed files with 29 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
RENDER(Request& context)
{
if(context.get["mode"] == "optional")
print(component_exists("components/does-not-exist") ? "unexpected" : "optional component absent");
else if(context.get["mode"] == "capture")
print(component("components/does-not-exist", context));
else
component_render("components/does-not-exist", context);
}