# HG changeset patch # User Waqas Hussain # Date 1327447330 -18000 # Node ID 10a9538f41f18cd783ea5b80425a0f5d011ccfb7 # Parent 513aa6fed9e9558f487d7a34ea797be03fa25e7a mod_muc_log_http: Return a 500 Internal Server Error on missing theme, not a traceback. diff -r 513aa6fed9e9 -r 10a9538f41f1 mod_muc_log_http/muc_log_http/mod_muc_log_http.lua --- a/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua Wed Jan 25 04:21:17 2012 +0500 +++ b/mod_muc_log_http/muc_log_http/mod_muc_log_http.lua Wed Jan 25 04:22:10 2012 +0500 @@ -652,7 +652,7 @@ node = urldecode(node); - assert(html.doc, "MUC hosts or theme not loaded"); + if not html.doc then return { status = "500 Internal Server Error", "MUC hosts or theme not loaded" }; end if host and not(hosts[host] and hosts[host].modules.muc and hosts[host].modules.muc_log) then return { status = "404 Not found", body = "No such MUC component" }; end if host and node and not(hosts[host].modules.muc.rooms[node.."@"..host]) then return { status = "404 Not found", body = "No such MUC room" }; end