Changeset

4292:c13b8003ee5c

mod_sentry: Pull message from error *before* we mutate it into something different...
author Matthew Wild <mwild1@gmail.com>
date Wed, 09 Dec 2020 22:32:31 +0000
parents 4291:a0d20e378670
children 4293:edde5905744a
files mod_sentry/sentry.lib.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_sentry/sentry.lib.lua	Wed Dec 09 22:23:49 2020 +0000
+++ b/mod_sentry/sentry.lib.lua	Wed Dec 09 22:32:31 2020 +0000
@@ -132,7 +132,6 @@
 
 function sentry_event_methods:add_exception(e)
 	if errors.is_err(e) then
-		e = error_to_sentry_exception(e);
 		if not self.event.message then
 			if e.text then
 				self:message(e.text);
@@ -140,6 +139,7 @@
 				self:message(e.context.wrapped_error);
 			end
 		end
+		e = error_to_sentry_exception(e);
 	elseif type(e) ~= "table" or not (e.type and e.value) then
 		e = error_to_sentry_exception(errors.coerce(nil, e));
 	end