From: Jérôme Benoit Date: Mon, 5 Feb 2024 21:56:31 +0000 (+0100) Subject: fix: fix worker event error handling X-Git-Tag: v1.2.36~37 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=887a125e6db5e0457e653b3c6848d18214558813;p=e-mobility-charging-stations-simulator.git fix: fix worker event error handling Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index 98cadb84..07d411b5 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -152,10 +152,10 @@ export class Bootstrap extends EventEmitter { ) this.on( ChargingStationWorkerMessageEvents.workerElementError, - (msg: ChargingStationWorkerMessage) => { + (eventError: ChargingStationWorkerEventError) => { logger.error( - `${this.logPrefix()} ${moduleName}.messageHandler: Error occurred while handling '${msg.data.event}' event on worker:`, - msg.data + `${this.logPrefix()} ${moduleName}.messageHandler: Error occurred while handling '${eventError.event}' event on worker:`, + eventError ) } )