Mercurial > prosody-modules
changeset 6408:7fe484e7b574
mod_http_oauth2: Make error template optional
Would fall back to mod_http_errors
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 18 Feb 2026 16:35:30 +0100 |
| parents | 6ebda1e5b4f3 |
| children | fb7d5c80dc40 |
| files | mod_http_oauth2/mod_http_oauth2.lua |
| diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_oauth2/mod_http_oauth2.lua Wed Feb 18 16:34:37 2026 +0100 +++ b/mod_http_oauth2/mod_http_oauth2.lua Wed Feb 18 16:35:30 2026 +0100 @@ -102,7 +102,7 @@ consent = read_file(template_path, "consent.html", true); oob = read_file(template_path, "oob.html", true); device = read_file(template_path, "device.html", true); - error = read_file(template_path, "error.html", true); + error = read_file(template_path, "error.html"); css = read_file(template_path, "style.css"); js = read_file(template_path, "script.js"); }; @@ -807,6 +807,7 @@ end local function render_error(err) + if not templates.error then return err or 500; end return render_page(templates.error, { error = err }); end
