# HG changeset patch # User Matthew Wild # Date 1753970850 -3600 # Node ID d1d774f79ea8c7a7d859c02309864515c2a476c3 # Parent 13f674a9fb221d3fece1cd0bb0316fc1005c0196 mod_rtbl: Handle and log iq errors diff -r 13f674a9fb22 -r d1d774f79ea8 mod_rtbl/mod_rtbl.lua --- a/mod_rtbl/mod_rtbl.lua Thu Jul 31 15:06:52 2025 +0100 +++ b/mod_rtbl/mod_rtbl.lua Thu Jul 31 15:07:30 2025 +0100 @@ -119,6 +119,11 @@ end module:hook("iq-result/host/"..request_id, update_list); + module:hook("iq-error/host/"..request_id, function (event) + local typ, cond, text = event.stanza:get_error(); + module:log("warn", "Failed to fetch RTBL contents from %s:%s: %s %s %s", rtbl_service_jid, rtbl_node, typ, cond, text); + return true; + end); module:add_timer(0, request_list); return rtbl;