From eb9ed8184f6892adf5782ead19ee814743247e78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 3 Nov 2020 01:45:51 +0100 Subject: [PATCH] Error on commands statistics fix. 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, 2 insertions(+), 2 deletions(-) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index f3512610..f7754b64 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -910,7 +910,7 @@ export default class ChargingStation { // Error Message case Constants.OCPP_JSON_CALL_ERROR_MESSAGE: if (this.getEnableStatistics()) { - this._statistics.addMessage(`Error ${command.code ? command.code : Constants.OCPP_ERROR_GENERIC_ERROR} on ${commandName}`); + this._statistics.addMessage(commandName + ' error'); } // Build Error Message messageToSend = JSON.stringify([messageType, messageId, command.code ? command.code : Constants.OCPP_ERROR_GENERIC_ERROR, command.message ? command.message : '', command.details ? command.details : {}]); @@ -946,7 +946,7 @@ export default class ChargingStation { function rejectCallback(error: OCPPError) { logger.debug(`${self._logPrefix()} Error %j on commandName %s command %j`, error, commandName, command); if (self.getEnableStatistics()) { - self._statistics.addMessage(`Error on commandName ${commandName}`, true); + self._statistics.addMessage(`${commandName} error`, true); } // Build Exception // eslint-disable-next-line no-empty-function -- 2.34.1