fix: Handling facebook client error for deleted story (#4984)

This commit is contained in:
Tejaswini Chile
2022-07-07 18:02:18 +05:30
committed by GitHub
parent 91d9584fcb
commit 2f3bdbdea2
5 changed files with 40 additions and 6 deletions

View File

@@ -71,6 +71,11 @@ class Messages::Messenger::MessageBuilder
rescue Koala::Facebook::AuthenticationError
@inbox.channel.authorization_error!
raise
rescue Koala::Facebook::ClientError => e
# The exception occurs when we are trying fetch the deleted story or blocked story.
@message.update(content: I18n.t('conversations.messages.instagram_deleted_story_content'))
Rails.logger.error e
{}
rescue StandardError => e
ChatwootExceptionTracker.new(e, account: @inbox.account).capture_exception
{}