this.name = new.target.name;
this.code = code ?? ErrorType.GENERIC_ERROR;
this.message = message ?? '';
- this.message = command ?? '';
+ this.command = command;
this.details = details ?? {};
Object.setPrototypeOf(this, new.target.prototype);
}
public async sendMessage(messageId: string, commandParams: any, messageType: MessageType, commandName: RequestCommand | IncomingRequestCommand,
- skipBuffering = false): Promise<unknown> {
+ skipBufferingOnError = false): Promise<unknown> {
// eslint-disable-next-line @typescript-eslint/no-this-alias
const self = this;
// Send a message through wsConnection
const beginId = PerformanceStatistics.beginMeasure(commandName);
this.chargingStation.wsConnection.send(messageToSend);
PerformanceStatistics.endMeasure(commandName, beginId);
- } else if (!skipBuffering) {
+ } else if (!skipBufferingOnError) {
// Buffer it
this.chargingStation.addToMessageQueue(messageToSend);
// Reject it