aboutsummaryrefslogtreecommitdiffstats
path: root/core/moduleapi.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-12-30 20:35:20 +0100
committerKim Alvefur <zash@zash.se>2018-12-30 20:35:20 +0100
commita89dd30b7e9e04e3b4fb89efc45245970353608f (patch)
treec74f02aa739cd31f5c7f51782b3c4cc41140e675 /core/moduleapi.lua
parent3b3af4805c4323fe915ea4ac5aa09110a19e7676 (diff)
downloadprosody-a89dd30b7e9e04e3b4fb89efc45245970353608f.tar.gz
prosody-a89dd30b7e9e04e3b4fb89efc45245970353608f.zip
core.moduleapi: Use convenience function for creating error object from stanza
Diffstat (limited to 'core/moduleapi.lua')
-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