chore: Instagram reconnect fix (#3142)

This commit is contained in:
Sojan Jose
2021-10-06 16:23:32 +05:30
committed by GitHub
parent 271ca53c58
commit 219a8c4bc5
3 changed files with 13 additions and 6 deletions

View File

@@ -9,8 +9,9 @@ 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
Rails.logger.info e
channel.authorization_error!
Sentry.capture_exception(e)
# TODO : handle specific errors or else page will get disconnected
# channel.authorization_error!
end
def send_message_to_facebook(delivery_params)

View File

@@ -18,7 +18,8 @@ class Instagram::SendOnInstagramService < Base::SendOnChannelService
send_to_facebook_page message_params
rescue StandardError => e
Sentry.capture_exception(e)
channel.authorization_error!
# TODO : handle specific errors or else page will get disconnected
# channel.authorization_error!
end
def message_params