From 8d85a02ca9a7a4f81fb58e987758103219642801 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 6 Mar 2025 20:09:47 +0530 Subject: [PATCH] feat: handle Channel errors (#11015) This PR adds missing error handlers for the following channels and cases 1. WhatsApp - Generic Handlers for both Cloud and 360Dialog (Deprecated) 2. Instagram - Handler for a case where there is an HTTP error instead of an `:error` in the 200 response 3. Facebook - Errors from the two sentry issues ([Net::OpenTimeout](https://chatwoot-p3.sentry.io/issues/6164805227) & [JSON::ParserError](https://chatwoot-p3.sentry.io/issues/5903200786)) 4. SMS: Generic handlers for Bandwidth SMS #### Checklist - [x] Bandwidth SMS - [x] Whatsapp Cloud + 360 Dialog - [x] Twilio SMS - [x] Line - [x] Telegram - [x] Instagram - [x] Facebook - [x] GMail - [x] 365 Mail - [x] SMTP Mail --------- Co-authored-by: Muhsin Keloth --- .../components-next/message/MessageError.vue | 2 +- .../components-next/message/MessageMeta.vue | 1 + app/models/channel/sms.rb | 21 +++- .../facebook/send_on_facebook_service.rb | 21 +++- .../instagram/send_on_instagram_service.rb | 28 +++-- .../whatsapp/providers/base_service.rb | 27 ++++ .../providers/whatsapp_360_dialog_service.rb | 12 +- .../providers/whatsapp_cloud_service.rb | 12 +- .../facebook/send_on_facebook_service_spec.rb | 49 ++++++++ .../send_on_instagram_service_spec.rb | 108 +++++++++++----- .../providers/whatsapp_cloud_service_spec.rb | 52 ++++++++ .../whatsapp/send_on_whatsapp_service_spec.rb | 115 +++++++++--------- 12 files changed, 324 insertions(+), 124 deletions(-) diff --git a/app/javascript/dashboard/components-next/message/MessageError.vue b/app/javascript/dashboard/components-next/message/MessageError.vue index e113ada71..d3a03e746 100644 --- a/app/javascript/dashboard/components-next/message/MessageError.vue +++ b/app/javascript/dashboard/components-next/message/MessageError.vue @@ -26,7 +26,7 @@ const { t } = useI18n(); />