ATG: fix start transaction requests counting
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / OCPPRequestService.ts
index 25c8943564a7f91afc639c22a7f99a0a28d247d9..e78ca0c6dfa4d8fcec3049d05b67a11d62df82de 100644 (file)
@@ -261,7 +261,7 @@ export default abstract class OCPPRequestService {
            * @param requestStatistic
            */
           function errorCallback(error: OCPPError, requestStatistic = true): void {
-            if (requestStatistic && chargingStation.getEnableStatistics()) {
+            if (requestStatistic === true && chargingStation.getEnableStatistics() === true) {
               chargingStation.performanceStatistics.addRequestStatistic(
                 commandName,
                 MessageType.CALL_ERROR_MESSAGE
@@ -361,7 +361,7 @@ export default abstract class OCPPRequestService {
     error: Error,
     params: HandleErrorParams<EmptyObject> = { throwError: true }
   ): void {
-    logger.error(`${chargingStation.logPrefix()} Request command ${commandName} error:`, error);
+    logger.error(`${chargingStation.logPrefix()} Request command '${commandName}' error:`, error);
     if (params?.throwError) {
       throw error;
     }