From 34dac8df932b35537f53ee2cd5528df084d2c880 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Tue, 19 Dec 2023 13:22:32 -0600 Subject: [PATCH] update sentry to capture message --- app/models/kinesis_stream.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/models/kinesis_stream.rb b/app/models/kinesis_stream.rb index 20ff422..fabadc4 100644 --- a/app/models/kinesis_stream.rb +++ b/app/models/kinesis_stream.rb @@ -42,6 +42,7 @@ def upsert_comments level: 'warning' ) Sentry.add_breadcrumb(crumb) + Sentry.capture_exception(e) if e.message.include?('ON CONFLICT DO UPDATE command cannot affect row a second time') @comment_events = @comment_events.uniq { |comment| comment[:comment_id] } retry @@ -61,6 +62,7 @@ def upsert_classifications level: 'warning' ) Sentry.add_breadcrumb(crumb) + Sentry.capture_exception(e) if e.message.include?('ON CONFLICT DO UPDATE command cannot affect row a second time') @classification_events = @classification_events.uniq { |classification| classification[:classification_id] } retry @@ -80,6 +82,7 @@ def upsert_classification_user_groups level: 'warning' ) Sentry.add_breadcrumb(crumb) + Sentry.capture_exception(e) if e.message.include?('ON CONFLICT DO UPDATE command cannot affect row a second time') @classification_user_groups = @classification_user_groups.uniq { |cug| [cug[:classification_id], cug[:user_group_id]] } retry