File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/api/integrations/channel/whatsapp Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -3505,6 +3505,8 @@ export class BaileysStartupService extends ChannelStartupService {
35053505 this . logger . error ( 'Download Media failed, trying to retry in 5 seconds...' ) ;
35063506 await new Promise ( ( resolve ) => setTimeout ( resolve , 5000 ) ) ;
35073507 const mediaType = Object . keys ( msg . message ) . find ( ( key ) => key . endsWith ( 'Message' ) ) ;
3508+ if ( ! mediaType ) throw new Error ( 'Could not determine mediaType for fallback' ) ;
3509+
35083510 try {
35093511 const media = await downloadContentFromMessage (
35103512 {
@@ -3523,6 +3525,7 @@ export class BaileysStartupService extends ChannelStartupService {
35233525 this . logger . info ( 'Download Media with downloadContentFromMessage was successful!' ) ;
35243526 } catch ( fallbackErr ) {
35253527 this . logger . error ( 'Download Media with downloadContentFromMessage also failed!' ) ;
3528+ throw fallbackErr ;
35263529 }
35273530 }
35283531 const typeMessage = getContentType ( msg . message ) ;
You can’t perform that action at this time.
0 commit comments