chore: WhatsApp template message error handling for invalid templates (#12157)

This commit is contained in:
Muhsin Keloth
2025-08-11 20:08:52 +05:30
committed by GitHub
parent 6784eb9b3d
commit 28452b300d
2 changed files with 28 additions and 1 deletions

View File

@@ -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,