Skip to content

Commit 8f642ad

Browse files
authored
fix: bubble server error up (#1389)
1 parent e8b50b5 commit 8f642ad

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

client/src/connection/rest/server.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33
import { l10n } from "vscode";
44

5-
import axios, { AxiosResponse } from "axios";
5+
import { AxiosResponse } from "axios";
66

77
import { Link, Server, ServersApi, SessionRequest } from "./api/compute";
88
import { BaseCompute, Compute, getApiConfig, stateOptions } from "./common";
@@ -94,14 +94,7 @@ export class ComputeServer extends Compute {
9494
},
9595
};
9696

97-
let resp: AxiosResponse;
98-
try {
99-
resp = await this.requestLink(link, { data: body });
100-
} catch (error) {
101-
if (axios.isAxiosError(error)) {
102-
throw new Error(error.message);
103-
}
104-
}
97+
const resp = await this.requestLink(link, { data: body });
10598

10699
//Create the session from the http resposne
107100
const session = ComputeSession.fromResponse(resp);

0 commit comments

Comments
 (0)