aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/error.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/error.lua b/util/error.lua
index 326c01f8..b83f81e5 100644
--- a/util/error.lua
+++ b/util/error.lua
@@ -141,7 +141,7 @@ local function from_stanza(stanza, context, source)
local error_tag = stanza:get_child("error");
context = context or {};
context.stanza = stanza;
- context.by = error_tag.attr.by or stanza.attr.from;
+ context.by = error_tag and error_tag.attr.by or stanza.attr.from;
local uri;
if condition == "gone" or condition == "redirect" then