From 5933cbc8c16288268032886a14e03d47b8ce84f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 31 Oct 2020 11:40:57 +0100 Subject: [PATCH] Refine error messages. 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.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)); -- 2.34.1