Skip to content

Commit

Permalink
update sentry to capture message
Browse files Browse the repository at this point in the history
  • Loading branch information
yuenmichelle1 committed Dec 19, 2023
1 parent a0a5de9 commit 34dac8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/kinesis_stream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 34dac8d

Please sign in to comment.