From 8aff53ef86cebfd518eb09d286c16a97b2077147 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Mon, 27 Jan 2025 10:55:04 -0300 Subject: [PATCH] fix(whatsapp.gblib): Fixed check status. --- packages/core.gbapp/services/GBMinService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core.gbapp/services/GBMinService.ts b/packages/core.gbapp/services/GBMinService.ts index e2cedfe0..970d13cc 100644 --- a/packages/core.gbapp/services/GBMinService.ts +++ b/packages/core.gbapp/services/GBMinService.ts @@ -531,7 +531,7 @@ export class GBMinService { try { // Performs the checking of WhatsApp API if enabled for this instance. - if (min.whatsAppDirectLine != undefined && instance.whatsappServiceKey !== null) { + if (min.whatsAppDirectLine && instance.whatsappServiceKey) { if (!(await min.whatsAppDirectLine.check(min))) { const error = `WhatsApp API lost connection for: ${min.botId}.`; GBLog.error(error); @@ -547,8 +547,8 @@ export class GBMinService { } catch (error) { // GB is not OK, 500 and detail the information on response content. - GBLog.error(error); - res.status(500).send(error.toString()); + GBLogEx.error(min, error); + res.status(500).send('Service with erros. Please, check service log.'); } }); }