chore: Remove sentry exceptions for the message status failed errors (#8285)
- Remove sending exceptions to Sentry after capturing the message failed errors.
This commit is contained in:
@@ -76,10 +76,8 @@ class Facebook::SendOnFacebookService < Base::SendOnChannelService
|
||||
|
||||
def handle_facebook_error(exception)
|
||||
# Refer: https://github.com/jgorset/facebook-messenger/blob/64fe1f5cef4c1e3fca295b205037f64dfebdbcab/lib/facebook/messenger/error.rb
|
||||
if exception.to_s.include?('The session has been invalidated') || exception.to_s.include?('Error validating access token')
|
||||
channel.authorization_error!
|
||||
else
|
||||
ChatwootExceptionTracker.new(exception, account: message.account, user: message.sender).capture_exception
|
||||
end
|
||||
return unless exception.to_s.include?('The session has been invalidated') || exception.to_s.include?('Error validating access token')
|
||||
|
||||
channel.authorization_error!
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user