diff options
author | Kim Alvefur <zash@zash.se> | 2019-12-29 22:20:51 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-12-29 22:20:51 +0100 |
commit | 103c09e0c42be4c4fe3440955e4eaad3f5d058c5 (patch) | |
tree | 22e101b45d23d2c111970fd1d175009628ef9690 | |
parent | 8f217cae73c46075eac6947ec6d71a56d555f790 (diff) | |
download | prosody-103c09e0c42be4c4fe3440955e4eaad3f5d058c5.tar.gz prosody-103c09e0c42be4c4fe3440955e4eaad3f5d058c5.zip |
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.
-rw-r--r-- | plugins/mod_http_errors.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_http_errors.lua b/plugins/mod_http_errors.lua index 2158b403..e151a68e 100644 --- a/plugins/mod_http_errors.lua +++ b/plugins/mod_http_errors.lua @@ -73,7 +73,7 @@ module:hook_object_event(server, "http-error", function (event) 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) |