fix: Handle error if the Twillio attachment download fails to download (#8705)
This commit is contained in:
@@ -109,6 +109,8 @@ class Twilio::IncomingMessageService
|
|||||||
|
|
||||||
attachment_file = download_attachment_file
|
attachment_file = download_attachment_file
|
||||||
|
|
||||||
|
return if attachment_file.blank?
|
||||||
|
|
||||||
attachment = @message.attachments.new(
|
attachment = @message.attachments.new(
|
||||||
account_id: @message.account_id,
|
account_id: @message.account_id,
|
||||||
file_type: file_type(params[:MediaContentType0])
|
file_type: file_type(params[:MediaContentType0])
|
||||||
@@ -144,6 +146,7 @@ class Twilio::IncomingMessageService
|
|||||||
Down.download(params[:MediaUrl0])
|
Down.download(params[:MediaUrl0])
|
||||||
else
|
else
|
||||||
ChatwootExceptionTracker.new(error, account: @inbox.account).capture_exception
|
ChatwootExceptionTracker.new(error, account: @inbox.account).capture_exception
|
||||||
|
nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user