error404: flow message into template

message was only being shown in the plain text case when the render
failed.

Signed-off-by: Karl Palsson <karlp@etactica.com>
This commit is contained in:
Karl Palsson 2020-07-06 17:35:14 +00:00
parent 1af55c31b2
commit 48715ba5c8
2 changed files with 2 additions and 1 deletions

View file

@ -394,7 +394,7 @@ function error404(message)
local function render()
local template = require "luci.template"
template.render("error404")
template.render("error404", {message=message})
end
if not util.copcall(render) then

View file

@ -7,5 +7,6 @@
<%+header%>
<h2 name="content">404 <%:Not Found%></h2>
<p><%:Sorry, the object you requested was not found.%></p>
<p><%=message%></p>
<tt><%:Unable to dispatch%>: <%=url(unpack(luci.dispatcher.context.request))%></tt>
<%+footer%>