From 7ad8b66b0b2e60220e58e18f161132a39c7cb670 Mon Sep 17 00:00:00 2001 From: Valerian Saliou Date: Sat, 3 Aug 2024 11:16:52 +0200 Subject: [PATCH] fix: add more logs --- src/broker/client.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/broker/client.ts b/src/broker/client.ts index acb9bcd4..da470662 100644 --- a/src/broker/client.ts +++ b/src/broker/client.ts @@ -263,6 +263,8 @@ class BrokerClient { try { // Connect client await this.client.connect(jid, password); + + logger.info("Could connect: success"); } catch (error) { // Mark as disconnected Store.$session.setConnected(false); @@ -272,19 +274,19 @@ class BrokerClient { if (error instanceof ProseConnectionError) { switch (error.type) { case ProseConnectionErrorType.TimedOut: { - logger.error("Cannot connect: timed out"); + logger.error("Could not connect: timed out"); break; } case ProseConnectionErrorType.InvalidCredentials: { - logger.error("Cannot connect: invalid credentials"); + logger.error("Could not connect: invalid credentials"); break; } case ProseConnectionErrorType.Generic: { - logger.error("Cannot connect: other reason"); + logger.error("Could not connect: other reason"); break; }