refactor: add error name in worker set worker startup error reporting
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 22 Nov 2023 09:15:02 +0000 (10:15 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 22 Nov 2023 09:15:02 +0000 (10:15 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStationWorker.ts

index a0adf80595a46d1ef2b4ba7772d735a6640c7248..955ce933b5ffb27d4e6315bd4206cd7373b101f3 100644 (file)
@@ -42,6 +42,7 @@ class ChargingStationWorker<Data extends WorkerData> extends AsyncResource {
             parentPort?.postMessage({
               event: WorkerMessageEvents.startWorkerElementError,
               data: {
+                name: (error as Error).name,
                 message: (error as Error).message,
                 stack: (error as Error).stack,
               },