From: Jérôme Benoit Date: Sat, 31 Oct 2020 10:40:57 +0000 (+0100) Subject: Refine error messages. X-Git-Tag: v1.0.1-0~233 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5933cbc8c16288268032886a14e03d47b8ce84f6;p=e-mobility-charging-stations-simulator.git Refine error messages. Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.js b/src/charging-station/ChargingStation.js index 60df4f85..1ffcfab7 100644 --- a/src/charging-station/ChargingStation.js +++ b/src/charging-station/ChargingStation.js @@ -504,7 +504,7 @@ export default class ChargingStation { if (Utils.isIterable(this._requests[messageId])) { [responseCallback, , requestPayload] = this._requests[messageId]; } else { - throw new Error(`Response request for unknown message id ${messageId} is not iterable`); + throw new Error(`Response request for message id ${messageId} is not iterable`); } if (!responseCallback) { // Error @@ -524,7 +524,7 @@ export default class ChargingStation { if (Utils.isIterable(this._requests[messageId])) { [, rejectCallback] = this._requests[messageId]; } else { - throw new Error(`Error request for unknown message id ${messageId} is not iterable`); + throw new Error(`Error request for message id ${messageId} is not iterable`); } delete this._requests[messageId]; rejectCallback(new OCPPError(commandName, commandPayload, errorDetails));