From e48e878b4f56b9dd562edaded30739d032e3edf4 Mon Sep 17 00:00:00 2001 From: nolramaf <30306355+nolramaf@users.noreply.github.com> Date: Mon, 1 Sep 2025 19:49:55 -0300 Subject: [PATCH] Update src/api/integrations/channel/meta/whatsapp.business.service.ts Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- .../integrations/channel/meta/whatsapp.business.service.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api/integrations/channel/meta/whatsapp.business.service.ts b/src/api/integrations/channel/meta/whatsapp.business.service.ts index 39edeb09..0b76b87a 100644 --- a/src/api/integrations/channel/meta/whatsapp.business.service.ts +++ b/src/api/integrations/channel/meta/whatsapp.business.service.ts @@ -460,7 +460,11 @@ export class BusinessStartupService extends ChannelStartupService { } if (mediaType == 'video' && !this.configService.get('S3').SAVE_VIDEO) { - throw new Error('Video upload is disabled.'); + this.logger?.info?.('Video upload attempted but is disabled by configuration.'); + return { + success: false, + message: 'Video upload is currently disabled. Please contact support if you need this feature enabled.', + }; } const mimetype = result.data?.mime_type || result.headers['content-type'];