import Ajv, { type JSONSchemaType } from 'ajv';
import ajvFormats from 'ajv-formats';
+import type OCPPResponseService from './OCPPResponseService';
+import { OCPPServiceUtils } from './OCPPServiceUtils';
import OCPPError from '../../exception/OCPPError';
import PerformanceStatistics from '../../performance/PerformanceStatistics';
import type { EmptyObject } from '../../types/EmptyObject';
import logger from '../../utils/Logger';
import Utils from '../../utils/Utils';
import type ChargingStation from '../ChargingStation';
-import type OCPPResponseService from './OCPPResponseService';
-import { OCPPServiceUtils } from './OCPPServiceUtils';
const moduleName = 'OCPPRequestService';
params: RequestParams = {
skipBufferingOnError: false,
triggerMessage: false,
+ throwError: false,
}
): Promise<ResponseType> {
try {
params
);
} catch (error) {
- this.handleSendMessageError(chargingStation, commandName, error as Error);
+ this.handleSendMessageError(chargingStation, commandName, error as Error, {
+ throwError: params.throwError,
+ });
}
}