chore: WhatsApp template message error handling for invalid templates (#12157)
This commit is contained in:
@@ -23,7 +23,10 @@ class Whatsapp::SendOnWhatsappService < Base::SendOnChannelService
|
||||
|
||||
name, namespace, lang_code, processed_parameters = processor.call
|
||||
|
||||
return if name.blank?
|
||||
if name.blank?
|
||||
message.update!(status: :failed, external_error: 'Template not found or invalid template name')
|
||||
return
|
||||
end
|
||||
|
||||
message_id = channel.send_template(message.conversation.contact_inbox.source_id, {
|
||||
name: name,
|
||||
|
||||
Reference in New Issue
Block a user