From 7f77d16f956cd81a026a042ed440aaaba37b1c56 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 23 May 2023 10:34:08 +0200 Subject: [PATCH] refactor: improve error logging MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStation.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 0851c41a..35d40ece 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -2180,7 +2180,9 @@ export class ChargingStation { if (Utils.isNotEmptyString(configuredSupervisionUrl)) { return new URL(configuredSupervisionUrl); } - throw new BaseError('No supervision urls configured'); + const errorMsg = 'No supervision url configured'; + logger.error(`${this.logPrefix()} ${errorMsg}`); + throw new BaseError(`${errorMsg}`); } private stopHeartbeat(): void { -- 2.34.1