core/moduleapi.lua
changeset 9754 65432dc80d90
parent 9752 99199b53019f
child 9870 09cc8c856e5e
--- a/core/moduleapi.lua	Sun Dec 30 20:30:59 2018 +0100
+++ b/core/moduleapi.lua	Sun Dec 30 20:35:20 2018 +0100
@@ -397,9 +397,7 @@
 
 		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