[core] catch error while handling incoming message NOWEB

This commit is contained in:
allburov committed 2023-08-21 14:24:51 +03:00
1 parent bce012f692
commit cae94c7b5c
1 file changed
+7 -1
+7 -1
View File
@@ -574,7 +574,13 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
}
private processIncomingMessage(message) {
return this.downloadMedia(message).then(this.toWAMessage);
return this.downloadMedia(message)
.then(this.toWAMessage)
.catch((error) => {
this.log.error('Failed to process incoming message');
this.log.error(error);
console.trace(error);
});
}
protected toWAMessage(message): Promise<WAMessage> {