public async validationCsvFile()

in src/services/data-factory/DataFactoryService.ts [17:44]


  public async validationCsvFile({
    entity,
    processInstanceId,
    accessToken,
    body,
  }: {
    accessToken: string;
    entity: string;
    processInstanceId: string;
    body: FileData;
  }) {
    const response = await this._http.axiosRef
      .post(`${this._configService.get('DATA_FACTORY_BASE_URL')}/${entity}/csv/validation`, body, {
        headers: {
          ...this._logging.axiosHeaders,
          'X-Access-Token': accessToken,
          'X-Source-Business-Process-Instance-Id': processInstanceId,
        },
      })
      .catch((err) => {
        if (err instanceof AxiosError) {
          throw new InvalidCsvFileError(JSON.stringify(err.response?.data));
        }
        throw err;
      });

    return response;
  }