message: getErrorMesssage()

in TailwindTradersBotComposer/scripts/provisionComposer.js [619:675]


        message: getErrorMesssage(err),
      });
      return provisionFailed();
    }

    const qnaDeploymentOutput = await client.deployments.get(resourceGroupName, qnaDeployName);
    if (qnaDeploymentOutput && qnaDeploymentOutput.properties && qnaDeploymentOutput.properties.outputs) {
      const qnaOutputResult = qnaDeploymentOutput.properties.outputs;
      qnaResult = unpackObject(qnaOutputResult);
    }
  }

  // If application insights created, update the application insights settings in azure bot service
  if (createAppInsights) {
    logger({
      status: BotProjectDeployLoggerType.PROVISION_INFO,
      message: `> Linking Application Insights settings to Bot Service ...`,
    });

    const appinsightsClient = new ApplicationInsightsManagementClient(creds, subId);
    const appComponents = await appinsightsClient.components.get(resourceGroupName, resourceGroupName);
    const appinsightsId = appComponents.appId;
    const appinsightsInstrumentationKey = appComponents.instrumentationKey;
    const apiKeyOptions = {
      name: `${resourceGroupName}-provision-${timeStamp}`,
      linkedReadProperties: [
        `/subscriptions/${subId}/resourceGroups/${resourceGroupName}/providers/microsoft.insights/components/${resourceGroupName}/api`,
        `/subscriptions/${subId}/resourceGroups/${resourceGroupName}/providers/microsoft.insights/components/${resourceGroupName}/agentconfig`,
      ],
      linkedWriteProperties: [
        `/subscriptions/${subId}/resourceGroups/${resourceGroupName}/providers/microsoft.insights/components/${resourceGroupName}/annotations`,
      ],
    };
    const appinsightsApiKeyResponse = await appinsightsClient.aPIKeys.create(
      resourceGroupName,
      resourceGroupName,
      apiKeyOptions
    );
    const appinsightsApiKey = appinsightsApiKeyResponse.apiKey;

    logger({
      status: BotProjectDeployLoggerType.PROVISION_INFO,
      message: `> AppInsights AppId: ${appinsightsId} ...`,
    });
    logger({
      status: BotProjectDeployLoggerType.PROVISION_INFO,
      message: `> AppInsights InstrumentationKey: ${appinsightsInstrumentationKey} ...`,
    });
    logger({
      status: BotProjectDeployLoggerType.PROVISION_INFO,
      message: `> AppInsights ApiKey: ${appinsightsApiKey} ...`,
    });

    if (appinsightsId && appinsightsInstrumentationKey && appinsightsApiKey) {
      const botServiceClient = new AzureBotService(creds, subId);
      const botCreated = await botServiceClient.bots.get(resourceGroupName, name);
      if (botCreated.properties) {