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 | 30f7e379d4b316c197c837dce2c47b73b8b77d1f (patch) | |
tree | 22e101b45d23d2c111970fd1d175009628ef9690 /plugins/mod_http_errors.lua | |
parent | 30d0c690a3eef472603c991a9e1d067c8a851f7d (diff) | |
download | prosody-30f7e379d4b316c197c837dce2c47b73b8b77d1f.tar.gz prosody-30f7e379d4b316c197c837dce2c47b73b8b77d1f.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.
Diffstat (limited to 'plugins/mod_http_errors.lua')
-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) |