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 @@ -3521,6 +3521,8 @@ export class BaileysStartupService extends ChannelStartupService {
35213521 this . logger . error ( 'Download Media failed, trying to retry in 5 seconds...' ) ;
35223522 await new Promise ( ( resolve ) => setTimeout ( resolve , 5000 ) ) ;
35233523 const mediaType = Object . keys ( msg . message ) . find ( ( key ) => key . endsWith ( 'Message' ) ) ;
3524+ if ( ! mediaType ) throw new Error ( 'Could not determine mediaType for fallback' ) ;
3525+
35243526 try {
35253527 const media = await downloadContentFromMessage (
35263528 {
@@ -3539,6 +3541,7 @@ export class BaileysStartupService extends ChannelStartupService {
35393541 this . logger . info ( 'Download Media with downloadContentFromMessage was successful!' ) ;
35403542 } catch ( fallbackErr ) {
35413543 this . logger . error ( 'Download Media with downloadContentFromMessage also failed!' ) ;
3544+ throw fallbackErr ;
35423545 }
35433546 }
35443547 const typeMessage = getContentType ( msg . message ) ;
You can’t perform that action at this time.
0 commit comments