Changeset

4288:26bc1ae88ccb

mod_sentry: Ensure frames gets encoded as a JSON array, even if empty
author Matthew Wild <mwild1@gmail.com>
date Wed, 09 Dec 2020 16:22:04 +0000
parents 4287:2c4157785b42
children 4289:de91b7cb7342
files mod_sentry/sentry.lib.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_sentry/sentry.lib.lua	Wed Dec 09 16:12:35 2020 +0000
+++ b/mod_sentry/sentry.lib.lua	Wed Dec 09 16:22:04 2020 +0000
@@ -1,3 +1,4 @@
+local array = require "util.array";
 local hex = require "util.hex";
 local random = require "util.random";
 local url = require "socket.url";
@@ -69,8 +70,8 @@
 	};
 	local traceback = e.context.traceback;
 	if traceback and type(traceback) == "table" then
-		local frames = {};
 		for i = #traceback, 1 do
+		local frames = array();
 			local frame = traceback[i];
 			table.insert(frames, {
 				["function"] = frame.info.name;