Skip to content

Commit

Permalink
Adding error message to the Sentry error title.
Browse files Browse the repository at this point in the history
This way, it's easier to group/archive/track them in Sentry.

Reference: CV2-5552.
  • Loading branch information
caiosba committed Nov 8, 2024
1 parent d619967 commit 39d4a4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/relationship.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def self.create_unless_exists(source_id, target_id, relationship_type, options =
end
if r.nil?
Rails.logger.error("[Relationship::create_unless_exists] returning nil: source_id #{source_id}, target_id #{target_id}, relationship_type #{relationship_type}.")
error_msg = StandardError.new('Unable to create new relationship as requested.')
error_msg = StandardError.new("Unable to create new relationship as requested: #{exception_message}")
CheckSentry.notify(error_msg, source_id: source_id, target_id: target_id, relationship_type: relationship_type, options: options, exception_message: exception_message, exception_class: exception_class)
end
r
Expand Down

0 comments on commit 39d4a4a

Please sign in to comment.