# HG changeset patch # User Kim Alvefur # Date 1771428930 -3600 # Node ID 7fe484e7b574c04c0d06cd0c511ef1cd3ee62d3b # Parent 6ebda1e5b4f35bbf21a5046bb26b469f14347bc8 mod_http_oauth2: Make error template optional Would fall back to mod_http_errors diff -r 6ebda1e5b4f3 -r 7fe484e7b574 mod_http_oauth2/mod_http_oauth2.lua --- 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