mod_sentry/sentry.lib.lua
changeset 4999 cb3de818ff55
parent 4296 c13b8003ee5c
equal deleted inserted replaced
4992:732229fe68ab 4999:cb3de818ff55
   219 local function resolve_sentry_response(response)
   219 local function resolve_sentry_response(response)
   220 	if response.code == 200 and response.body then
   220 	if response.code == 200 and response.body then
   221 		local data = json.decode(response.body);
   221 		local data = json.decode(response.body);
   222 		return data;
   222 		return data;
   223 	end
   223 	end
       
   224 	module:log("warn", "Unexpected response from server: %d: %s", response.code, response.body);
   224 	return promise.reject(response);
   225 	return promise.reject(response);
   225 end
   226 end
   226 
   227 
   227 function sentry_mt:send(event)
   228 function sentry_mt:send(event)
   228 	local json_payload = json.encode(event);
   229 	local json_payload = json.encode(event);