Merge pull request #813 from SAP/combined-prs-branch
[e-mobility-charging-stations-simulator.git] / src / charging-station / ocpp / 1.6 / OCPP16ResponseService.ts
index 4e7b9716d1f11428508e8075be18c1f0b5df4ad5..b634562b7da188abecf0d4daa354bd6524a743dc 100644 (file)
@@ -366,7 +366,7 @@ export class OCPP16ResponseService extends OCPPResponseService {
           ErrorType.NOT_IMPLEMENTED,
           `${commandName} is not implemented to handle response PDU ${JSON.stringify(
             payload,
-            null,
+            undefined,
             2,
           )}`,
           commandName,
@@ -378,7 +378,7 @@ export class OCPP16ResponseService extends OCPPResponseService {
         ErrorType.SECURITY_ERROR,
         `${commandName} cannot be issued to handle response PDU ${JSON.stringify(
           payload,
-          null,
+          undefined,
           2,
         )} while the charging station is not registered on the central server.`,
         commandName,
@@ -560,8 +560,7 @@ export class OCPP16ResponseService extends OCPPResponseService {
     }
     if (connectorStatus?.transactionStarted === true) {
       logger.error(
-        `${chargingStation.logPrefix()} Trying to start a transaction on an already used connector id ${connectorId}:`,
-        connectorStatus,
+        `${chargingStation.logPrefix()} Trying to start a transaction on an already used connector id ${connectorId} by idTag ${connectorStatus?.transactionIdTag}}`,
       );
       return;
     }
@@ -571,8 +570,7 @@ export class OCPP16ResponseService extends OCPPResponseService {
           for (const [id, status] of evseStatus.connectors) {
             if (id !== connectorId && status?.transactionStarted === true) {
               logger.error(
-                `${chargingStation.logPrefix()} Trying to start a transaction on an already used evse id ${evseId}:`,
-                evseStatus,
+                `${chargingStation.logPrefix()} Trying to start a transaction on an already used evse id ${evseId} by connector id ${id} with idTag ${status?.transactionIdTag}}`,
               );
               await this.resetConnectorOnStartTransactionError(chargingStation, connectorId);
               return;