Skip to content

Commit e430d9e

Browse files
committed
Fix error json
1 parent 7df26ea commit e430d9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ export class BaileysStartupService extends ChannelStartupService {
425425

426426
this.logger.log(`Connection state changed to: ${connection}, instance: ${this.instance.id}`);
427427
if (lastDisconnect?.error) {
428-
this.logger.warn(`Connection error:`, lastDisconnect.error);
428+
this.logger.warn(`Connection error: ${JSON.stringify(lastDisconnect.error)}`);
429429
}
430430
}
431431

@@ -1997,7 +1997,7 @@ export class BaileysStartupService extends ChannelStartupService {
19971997
this.logger.log(`Message sent successfully with ID: ${result.key.id}`);
19981998
return result;
19991999
} catch (error) {
2000-
this.logger.error(`Failed to send message to ${sender}:`, error);
2000+
this.logger.error(`Failed to send message to ${sender}: ${error.message || JSON.stringify(error)}`);
20012001
throw error;
20022002
}
20032003
}

0 commit comments

Comments
 (0)