From: Jérôme Benoit Date: Mon, 20 Nov 2023 20:51:45 +0000 (+0100) Subject: refactor: refine type casting in OCPP stack X-Git-Tag: v1.2.26~20 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e3fd8f6dce61f4b723e18b524c50fd00c864c82d;p=e-mobility-charging-stations-simulator.git refactor: refine type casting in OCPP stack Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/OCPPRequestService.ts b/src/charging-station/ocpp/OCPPRequestService.ts index 849ecbd0..bb9a75fe 100644 --- a/src/charging-station/ocpp/OCPPRequestService.ts +++ b/src/charging-station/ocpp/OCPPRequestService.ts @@ -12,7 +12,6 @@ import { type ErrorResponse, ErrorType, type IncomingRequestCommand, - type JsonObject, type JsonType, MessageType, type OCPPVersion, @@ -462,7 +461,7 @@ export abstract class OCPPRequestService { params?.skipBufferingOnError === false ? '' : 'non ' }buffered message id '${messageId}' with content '${messageToSend}'`, commandName, - (messagePayload as JsonObject).details, + (messagePayload as OCPPError).details, ), ); }