]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(ocpp): graceful OCPPError fallback instead of throw in buildMessageToSend
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 16 Mar 2026 15:54:52 +0000 (16:54 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 16 Mar 2026 15:54:52 +0000 (16:54 +0100)
commit927f8912a498d2f1b4259d6eb95029b0e5bcb628
tree640829609cfa6fd89d7691b1408b6a206a908052
parent877d6a682814a449e145c92c0e107ee784817044
fix(ocpp): graceful OCPPError fallback instead of throw in buildMessageToSend

Replace defensive throw with OCPPError construction when messagePayload
is not an OCPPError instance. Uses InternalError code per OCPP-J §4.2.3.
Harmonizes with the ternary instanceof pattern used at L452/503 in the
same file for errorDetails extraction.
src/charging-station/ocpp/OCPPRequestService.ts