message: Require `ServiceClient` request attempts during warmup
diff: import { HttpOperationResponse, RestError, ServiceClient } from '@azure/ms-rest-js';
  import { createGenericClient } from '@microsoft/vscode-azext-azureutils';
  -import { IActionContext } from '@microsoft/vscode-azext-utils';
  +import { IActionContext, IParsedError, parseError } from '@microsoft/vscode-azext-utils';
  +import * as retry from 'p-retry';
  import * as path from 'path';
  import { createKuduClient } from './createKuduClient';
  import { ParsedSite } from './SiteClient';
  @@ -64,11 +65,33 @@ async function getFsResponse(context: IActionContext, site: ParsedSite, filePath
  filePath = path.posix.join(linuxHome, filePath);
  }
  + /*
  + Related to issue: https://github.com/microsoft/vscode-azurefunctions/issues/3337
  + Sometimes receive a 'BadGateway' or 'ServiceUnavailable' error on initial fetch, but consecutive re-fetching usually fixes the issue.
  + Under these circumstances, we will attempt to do the call 3 times during warmup before throwing the error.
  + */
  + const retries = 3;
  + const badGateway: RegExp = /BadGateway/i;
  + const serviceUnavailable: RegExp = /ServiceUnavailable/i;
  const client: ServiceClient = await createGenericClient(context, site.subscription);
  +
  + return await retry<HttpOperationResponse>(
  + async () => {
  + try {
  return await client.sendRequest({
  method: 'GET',
  url: `${site.id}/hostruntime/admin/vfs/${filePath}/?api-version=2018-11-01`
  });
  + } catch (error) {
  + const parsedError: IParsedError = parseError(error);
  + if (!(badGateway.test(parsedError.message) || serviceUnavailable.test(parsedError.message))) {
  + throw new retry.AbortError(error);
  + }
  + throw error;
  + }
  + },
  + { retries, minTimeout: 10 * 1000 }
  + );
  } else {
  const kuduClient = await createKuduClient(context, site);
  return (await kuduClient.vfs.getItem(filePath))._response;
  