fix: Error shouldn't halt the campaign for entire audience (#11980)
## Summary - handle Twilio failures per contact when running one-off SMS campaigns - rescue errors in WhatsApp and generic SMS one-off campaigns so they continue - add specs confirming campaigns continue sending when a single contact fails fixes: https://github.com/chatwoot/chatwoot/issues/9000 Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -29,5 +29,7 @@ class Sms::OneoffSmsCampaignService
|
||||
|
||||
def send_message(to:, content:)
|
||||
channel.send_text_message(to, content)
|
||||
rescue StandardError => e
|
||||
Rails.logger.error("[SMS Campaign #{campaign.id}] Failed to send to #{to}: #{e.message}")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user