Skip to content

Commit e48e878

Browse files
Update src/api/integrations/channel/meta/whatsapp.business.service.ts
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent 293f655 commit e48e878

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/api/integrations/channel/meta/whatsapp.business.service.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,11 @@ export class BusinessStartupService extends ChannelStartupService {
460460
}
461461

462462
if (mediaType == 'video' && !this.configService.get<S3>('S3').SAVE_VIDEO) {
463-
throw new Error('Video upload is disabled.');
463+
this.logger?.info?.('Video upload attempted but is disabled by configuration.');
464+
return {
465+
success: false,
466+
message: 'Video upload is currently disabled. Please contact support if you need this feature enabled.',
467+
};
464468
}
465469

466470
const mimetype = result.data?.mime_type || result.headers['content-type'];

0 commit comments

Comments
 (0)