Skip to content

Commit

Permalink
Put back return with await statement to reach the catch
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasBrazi06 committed Apr 15, 2022
1 parent fa25331 commit c64c0d5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/server/ocpp/services/OCPPService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c64c0d5

Please sign in to comment.