Refine error messages.
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 31 Oct 2020 10:40:57 +0000 (11:40 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 31 Oct 2020 10:40:57 +0000 (11:40 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.js

index 60df4f8547df03580161da34a73f2d2dd6b8b5b5..1ffcfab72f9923001770364de10166e9eb632df9 100644 (file)
@@ -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));