chore: Upgrade Exception tracking (#4638)
- Upgrade Sentry Libraries - Enable provision for account and user info in error tracking - Add ChatwootExceptionTracker fixes: #4375
This commit is contained in:
@@ -12,7 +12,7 @@ class AutomationRules::ActionService
|
||||
begin
|
||||
send(action[:action_name], action[:action_params])
|
||||
rescue StandardError => e
|
||||
Sentry.capture_exception(e)
|
||||
ChatwootExceptionTracker.new(e, account: @account).capture_exception
|
||||
end
|
||||
end
|
||||
ensure
|
||||
|
||||
@@ -9,7 +9,7 @@ class Facebook::SendOnFacebookService < Base::SendOnChannelService
|
||||
send_message_to_facebook fb_text_message_params if message.content.present?
|
||||
send_message_to_facebook fb_attachment_message_params if message.attachments.present?
|
||||
rescue Facebook::Messenger::FacebookError => e
|
||||
Sentry.capture_exception(e)
|
||||
ChatwootExceptionTracker.new(e, account: message.account, user: message.sender).capture_exception
|
||||
# TODO : handle specific errors or else page will get disconnected
|
||||
# channel.authorization_error!
|
||||
end
|
||||
|
||||
@@ -38,7 +38,7 @@ class Instagram::MessageText < Instagram::WebhooksBaseService
|
||||
raise
|
||||
rescue StandardError => e
|
||||
result = {}
|
||||
Sentry.capture_exception(e)
|
||||
ChatwootExceptionTracker.new(e, account: @inbox.account).capture_exception
|
||||
end
|
||||
|
||||
find_or_create_contact(result)
|
||||
|
||||
@@ -17,7 +17,7 @@ class Instagram::SendOnInstagramService < Base::SendOnChannelService
|
||||
send_to_facebook_page attachament_message_params if message.attachments.present?
|
||||
send_to_facebook_page message_params
|
||||
rescue StandardError => e
|
||||
Sentry.capture_exception(e)
|
||||
ChatwootExceptionTracker.new(e, account: message.account, user: message.sender).capture_exception
|
||||
# TODO : handle specific errors or else page will get disconnected
|
||||
# channel.authorization_error!
|
||||
end
|
||||
|
||||
@@ -7,7 +7,7 @@ class MessageTemplates::Template::EmailCollect
|
||||
conversation.messages.create!(email_input_box_template_message_params)
|
||||
end
|
||||
rescue StandardError => e
|
||||
Sentry.capture_exception(e)
|
||||
ChatwootExceptionTracker.new(e, account: conversation.account).capture_exception
|
||||
true
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ class MessageTemplates::Template::Greeting
|
||||
conversation.messages.create!(greeting_message_params)
|
||||
end
|
||||
rescue StandardError => e
|
||||
Sentry.capture_exception(e)
|
||||
ChatwootExceptionTracker.new(e, account: conversation.account).capture_exception
|
||||
true
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ class MessageTemplates::Template::OutOfOffice
|
||||
conversation.messages.create!(out_of_office_message_params)
|
||||
end
|
||||
rescue StandardError => e
|
||||
Sentry.capture_exception(e)
|
||||
ChatwootExceptionTracker.new(e, account: conversation.account).capture_exception
|
||||
true
|
||||
end
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ class Twilio::SendOnTwilioService < Base::SendOnChannelService
|
||||
begin
|
||||
twilio_message = client.messages.create(**message_params)
|
||||
rescue Twilio::REST::TwilioError => e
|
||||
Sentry.capture_exception(e)
|
||||
ChatwootExceptionTracker.new(e, user: message.sender, account: message.account).capture_exception
|
||||
end
|
||||
message.update!(source_id: twilio_message.sid) if twilio_message
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user