From 04e146dc6631d083646de333b1cc0e836783ea97 Mon Sep 17 00:00:00 2001 From: sunmorgus Date: Wed, 28 Mar 2018 10:59:54 -0400 Subject: [PATCH] Fix for when SiteClient constructor throws ArgumentError (#372) --- src/explorer/WebAppProvider.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/explorer/WebAppProvider.ts b/src/explorer/WebAppProvider.ts index b1aeb9cc..0589f439 100644 --- a/src/explorer/WebAppProvider.ts +++ b/src/explorer/WebAppProvider.ts @@ -32,6 +32,12 @@ export class WebAppProvider implements IChildProvider { this._nextLink = webAppCollection.nextLink; return await Promise.all(webAppCollection + .filter((s: Site) => { + try { + const siteClient = new SiteClient(s, node); + return siteClient !== undefined; + } catch { return false; } + }) .map((s: Site) => new SiteClient(s, node)) .filter((s: SiteClient) => !s.isFunctionApp) .map(async (s: SiteClient) => {