Diff

plugins/mod_http_errors.lua @ 10574:f70c874b7936

mod_http_errors: Use text from util.errror object if included This makes util.error objects useful for more than just an error code container.
author Kim Alvefur <zash@zash.se>
date Sun, 29 Dec 2019 22:20:51 +0100
parent 10430:46dd9df2db0c
child 11153:e4075ca84a1a
line wrap: on
line diff
--- a/plugins/mod_http_errors.lua	Sun Dec 29 01:11:55 2019 +0100
+++ b/plugins/mod_http_errors.lua	Sun Dec 29 22:20:51 2019 +0100
@@ -73,7 +73,7 @@
 	if event.response then
 		event.response.headers.content_type = "text/html; charset=utf-8";
 	end
-	return get_page(event.code, (show_private and event.private_message) or event.message);
+	return get_page(event.code, (show_private and event.private_message) or event.message or (event.error and event.error.text));
 end);
 
 module:hook_object_event(server, "http-error", function (event)