# HG changeset patch # User Kim Alvefur # Date 1605454268 -3600 # Node ID d33b480befcba11a6d9b78db5971ddffe33857dd # Parent 8b489203e4d3361a4e7af86c9d2b3480b18ac0ec mod_rest: Fix attempt at indexing nil if an error stanza is missing diff -r 8b489203e4d3 -r d33b480befcb mod_rest/jsonmap.lib.lua --- a/mod_rest/jsonmap.lib.lua Sun Nov 15 16:29:48 2020 +0100 +++ b/mod_rest/jsonmap.lib.lua Sun Nov 15 16:31:08 2020 +0100 @@ -467,7 +467,7 @@ type = err_typ, condition = err_condition, text = err_text, - by = error.attr.by, + by = error and error.attr.by or nil, }; return t; end