From: Jérôme Benoit Date: Tue, 3 Nov 2020 00:45:51 +0000 (+0100) Subject: Error on commands statistics fix. X-Git-Tag: v1.0.1-0~224 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=eb9ed8184f6892adf5782ead19ee814743247e78;p=e-mobility-charging-stations-simulator.git Error on commands statistics fix. Signed-off-by: Jérôme Benoit --- 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