Skip to content

Commit

Permalink
Enforce error.message, and gsub on message, rather than table.
Browse files Browse the repository at this point in the history
  • Loading branch information
QartemisT authored Oct 1, 2023
1 parent 3a8061b commit cf3a539
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions WagoAnalytics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,12 @@ do
if #self.errors > 512 then
return false
end
if #error > 1024 then
error = error:sub(0, 1021) .. "..."
-- Errors must contain at least a message
if not error.message then
return false
end
if #error.message > 1024 then
error.message = error.message:sub(0, 1021) .. "..."
end
tinsert(self.errors, {
error = error,
Expand Down

0 comments on commit cf3a539

Please sign in to comment.