fix: Handle error if the Twillio attachment download fails to download (#8705)

This commit is contained in:
Muhsin Keloth
2024-01-15 19:13:44 +05:30
committed by GitHub
parent 22db201a08
commit 52a5a59ddb

View File

@@ -109,6 +109,8 @@ class Twilio::IncomingMessageService
attachment_file = download_attachment_file
return if attachment_file.blank?
attachment = @message.attachments.new(
account_id: @message.account_id,
file_type: file_type(params[:MediaContentType0])
@@ -144,6 +146,7 @@ class Twilio::IncomingMessageService
Down.download(params[:MediaUrl0])
else
ChatwootExceptionTracker.new(error, account: @inbox.account).capture_exception
nil
end
end
end