From e430d9e3e1c65084b3382aa2e26cc7ce6fd1f2bc Mon Sep 17 00:00:00 2001 From: Victor Calazans Date: Sat, 26 Jul 2025 18:12:02 -0300 Subject: [PATCH] Fix error json --- .../integrations/channel/whatsapp/whatsapp.baileys.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts index 50e862eb..1e6741f4 100644 --- a/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts +++ b/src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts @@ -425,7 +425,7 @@ export class BaileysStartupService extends ChannelStartupService { this.logger.log(`Connection state changed to: ${connection}, instance: ${this.instance.id}`); if (lastDisconnect?.error) { - this.logger.warn(`Connection error:`, lastDisconnect.error); + this.logger.warn(`Connection error: ${JSON.stringify(lastDisconnect.error)}`); } } @@ -1997,7 +1997,7 @@ export class BaileysStartupService extends ChannelStartupService { this.logger.log(`Message sent successfully with ID: ${result.key.id}`); return result; } catch (error) { - this.logger.error(`Failed to send message to ${sender}:`, error); + this.logger.error(`Failed to send message to ${sender}: ${error.message || JSON.stringify(error)}`); throw error; } }