aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/moduleapi.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/moduleapi.lua b/core/moduleapi.lua
index 57aa4e9f..c6193cfd 100644
--- a/core/moduleapi.lua
+++ b/core/moduleapi.lua
@@ -397,9 +397,7 @@ function api:send_iq(stanza, origin, timeout)
local function error_handler(event)
if event.stanza.attr.from == stanza.attr.to then
- local error_type, condition, text = event.stanza:get_error();
- local err = errutil.new({ type = error_type, condition = condition, text = text }, event);
- reject(err);
+ reject(errutil.from_stanza(event.stanza), event);
return true;
end
end