From: Jo-Philipp Wich Date: Mon, 7 Aug 2023 21:29:50 +0000 (+0200) Subject: luci-base: dispatcher.uc: fix error500() reporting in fallback case X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=a435d4e11a1f0701200ad392000dbaf0d0135405;p=project%2Fluci.git luci-base: dispatcher.uc: fix error500() reporting in fallback case Fix the `error500()` fallback code path to properly output the given error message in case rendering the error template failed. Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/ucode/dispatcher.uc b/modules/luci-base/ucode/dispatcher.uc index 39af8375ea..831922ac1d 100644 --- a/modules/luci-base/ucode/dispatcher.uc +++ b/modules/luci-base/ucode/dispatcher.uc @@ -52,7 +52,7 @@ function error500(msg, ex) { } catch { http.write('\n'); - http.write(`

${trim(ex)}

\n`); + http.write(`

${trim(msg)}

\n`); if (ex) { http.write(`

${trim(ex.message)}

\n`);