Show proper error when an update fails

This commit is contained in:
Asher 2020-04-02 17:20:25 -05:00
parent d1445a8135
commit 9c6581273e
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
1 changed files with 2 additions and 2 deletions

View File

@ -512,7 +512,7 @@ index eab8591492..26668701f7 100644
options.logService.error(`${logPrefix} socketFactory.connect() failed. Error:`); options.logService.error(`${logPrefix} socketFactory.connect() failed. Error:`);
diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts diff --git a/src/vs/server/browser/client.ts b/src/vs/server/browser/client.ts
new file mode 100644 new file mode 100644
index 0000000000..a27a6f3a45 index 0000000000..4f8543d975
--- /dev/null --- /dev/null
+++ b/src/vs/server/browser/client.ts +++ b/src/vs/server/browser/client.ts
@@ -0,0 +1,266 @@ @@ -0,0 +1,266 @@
@ -692,7 +692,7 @@ index 0000000000..a27a6f3a45
+ headers: { "content-type": "application/json" }, + headers: { "content-type": "application/json" },
+ }); + });
+ if (response.status !== 200) { + if (response.status !== 200) {
+ throw new Error("Unexpected response"); + throw new Error(response.statusText);
+ } + }
+ +
+ const json = await response.json(); + const json = await response.json();