Skip to content

Commit 9c362d3

Browse files
No more double auth prompts (microsoft#250156)
1 parent 1b56299 commit 9c362d3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/vs/workbench/api/common/extHostMcp.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,12 @@ class McpHTTPHandle extends Disposable {
270270
this._mode = { value: HttpMode.Http, sessionId: nextSessionId };
271271
}
272272

273-
if (this._mode.value === HttpMode.Unknown && res.status >= 400 && res.status < 500) {
273+
if (this._mode.value === HttpMode.Unknown &&
274+
// We care about 4xx errors...
275+
res.status >= 400 && res.status < 500
276+
// ...except for 401 and 403, which are auth errors
277+
&& res.status !== 401 && res.status !== 403
278+
) {
274279
this._log(LogLevel.Info, `${res.status} status sending message to ${this._launch.uri}, will attempt to fall back to legacy SSE`);
275280
this._sseFallbackWithMessage(message);
276281
return;

0 commit comments

Comments
 (0)