--- a/mod_rest/jsonmap.lib.lua Wed Jan 29 21:44:00 2020 +0100
+++ b/mod_rest/jsonmap.lib.lua Sat Feb 01 00:38:10 2020 +0100
@@ -203,11 +203,13 @@
end
if t.type == "error" then
+ local error = s:get_child("error");
local err_typ, err_condition, err_text = s:get_error();
t.error = {
type = err_typ,
condition = err_condition,
- text = err_text
+ text = err_text,
+ by = error.attr.by,
};
return t;
end
@@ -281,7 +283,7 @@
end
if type(t.error) == "table" then
- return st.error_reply(st.reply(s), str(t.error.type), str(t.error.condition), str(t.error.text));
+ return st.error_reply(st.reply(s), str(t.error.type), str(t.error.condition), str(t.error.text), str(t.error.by));
elseif t.type == "error" then
s:text_tag("error", t.body, { code = t.error_code and tostring(t.error_code) });
return s;