[release] src/goEnvironmentStatus.ts: ignore uninstalled Go on network failure

This CL handles errors in the network request to get uninstalled
versions of Go. If there is an error, an empty result is returned rather
than erroring.

Fixes golang/vscode-go#438

Change-Id: Ieab81b9b4e7034066ea11a97c843a1cbf8601b88
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/245677
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
(cherry picked from commit 18eaf7efd7c98b4d4fa3b0e3d7cbea1560bdc90b)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/245643
Reviewed-by: Brayden Cloud <bcloud@google.com>
diff --git a/src/goEnvironmentStatus.ts b/src/goEnvironmentStatus.ts
index a900193..513b243 100644
--- a/src/goEnvironmentStatus.ts
+++ b/src/goEnvironmentStatus.ts
@@ -433,11 +433,16 @@
 }
 async function fetchDownloadableGoVersions(): Promise<GoEnvironmentOption[]> {
 	// fetch information about what Go versions are available to install
-	const webResults = await WebRequest.json<GoVersionWebResult[]>('https://golang.org/dl/?mode=json');
-	if (!webResults) {
+	let webResults;
+	try {
+		webResults = await WebRequest.json<GoVersionWebResult[]>('https://golang.org/dl/?mode=json');
+	} catch (error) {
 		return [];
 	}
 
+	if (!webResults) {
+		return [];
+	}
 	// turn the web result into GoEnvironmentOption model
 	return webResults.reduce((opts, result: GoVersionWebResult) => {
 		// TODO: allow downloading from different sites