commandParams?: JsonType,
params?: RequestParams
): Promise<Response> {
- if (
- Object.values(OCPP16RequestCommand).includes(commandName) &&
- ChargingStationUtils.isCommandSupported(commandName, chargingStation)
- ) {
+ if (ChargingStationUtils.isRequestCommandSupported(commandName, chargingStation)) {
return (await this.sendMessage(
chargingStation,
Utils.generateUUID(),
}
throw new OCPPError(
ErrorType.NOT_SUPPORTED,
- `${moduleName}.requestHandler: Unsupported OCPP command ${commandName}`,
+ `${moduleName}.requestHandler: Unsupported OCPP command '${commandName}'`,
commandName,
commandParams
);
throw new OCPPError(
ErrorType.NOT_SUPPORTED,
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
- `${moduleName}.buildRequestPayload: Unsupported OCPP command: ${commandName}`,
+ `${moduleName}.buildRequestPayload: Unsupported OCPP command '${commandName}'`,
commandName,
commandParams
);