From c64c0d5484a6018dc1154bebd30abb1d16fd8b9e Mon Sep 17 00:00:00 2001 From: LucasBrazi06 Date: Fri, 15 Apr 2022 17:48:10 +0200 Subject: [PATCH] Put back return with await statement to reach the catch --- src/server/ocpp/services/OCPPService.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/server/ocpp/services/OCPPService.ts b/src/server/ocpp/services/OCPPService.ts index 131ac5b9cc..5c0c4196d7 100644 --- a/src/server/ocpp/services/OCPPService.ts +++ b/src/server/ocpp/services/OCPPService.ts @@ -1420,13 +1420,12 @@ export default class OCPPService { const carImplementation = await CarConnectorFactory.getCarConnectorImpl(tenant, transaction.car.carConnectorData.carConnectorID); if (carImplementation) { try { - return carImplementation.getCurrentSoC(transaction.car, transaction.userID); + return await carImplementation.getCurrentSoC(transaction.car, transaction.userID); + // eslint-disable-next-line no-empty } catch { - return null; } } } - return null; } private addChargingStationToException(error: BackendError, chargingStationID: string): void {