From cececfac53a9352b9ce6b07bcdd73ab32cdd094d Mon Sep 17 00:00:00 2001 From: Caio <117518+caiosba@users.noreply.github.com> Date: Fri, 8 Nov 2024 11:37:07 -0300 Subject: [PATCH] Adding error message to the Sentry error title. This way, it's easier to group/archive/track them in Sentry. Reference: CV2-5552. --- app/models/relationship.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/relationship.rb b/app/models/relationship.rb index 1bbeaa847..fbded8653 100644 --- a/app/models/relationship.rb +++ b/app/models/relationship.rb @@ -177,7 +177,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