Skip to content

Commit 6442338

Browse files
Merge pull request #504 from gjsjohnmurray/fix-503
fix #503 ask for password when needed
2 parents deda205 + ab6bb5c commit 6442338

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/api/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ export class AtelierAPI {
357357
return data;
358358
}
359359
} catch (error) {
360-
if (error.error && error.error.code === "ECONNREFUSED") {
360+
if (error.code === "ECONNREFUSED") {
361+
authRequestMap.delete(target);
361362
panel.text = `${this.connInfo} $(debug-disconnect)`;
362363
panel.tooltip = "Disconnected";
363364
workspaceState.update(this.configName + ":host", undefined);

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export async function checkConnection(clearCookies = false, uri?: vscode.Uri): P
279279
.catch((error) => {
280280
let message = error.message;
281281
let errorMessage;
282-
if (error.status === 401) {
282+
if (error.statusCode === 401) {
283283
setTimeout(() => {
284284
const username = api.config.username;
285285
if (username === "") {

0 commit comments

Comments
 (0)