);
} catch (error) {
this.handleSendMessageError(chargingStation, commandName, error as Error, {
- throwError: false,
+ throwError: true,
});
}
}
params
);
} catch (error) {
- this.handleSendMessageError(chargingStation, commandName, error as Error, {
- throwError: false,
- });
+ this.handleSendMessageError(chargingStation, commandName, error as Error);
}
}
chargingStation: ChargingStation,
commandName: RequestCommand | IncomingRequestCommand,
error: Error,
- params: HandleErrorParams<EmptyObject> = { throwError: true }
+ params: HandleErrorParams<EmptyObject> = { throwError: false }
): void {
logger.error(`${chargingStation.logPrefix()} Request command '${commandName}' error:`, error);
- if (params?.throwError) {
+ if (params?.throwError === true) {
throw error;
}
}