* @param requestStatistic
*/
function errorCallback(error: OCPPError, requestStatistic = true): void {
- if (requestStatistic && chargingStation.getEnableStatistics()) {
+ if (requestStatistic === true && chargingStation.getEnableStatistics() === true) {
chargingStation.performanceStatistics.addRequestStatistic(
commandName,
MessageType.CALL_ERROR_MESSAGE
error: Error,
params: HandleErrorParams<EmptyObject> = { throwError: true }
): void {
- logger.error(`${chargingStation.logPrefix()} Request command ${commandName} error:`, error);
+ logger.error(`${chargingStation.logPrefix()} Request command '${commandName}' error:`, error);
if (params?.throwError) {
throw error;
}