We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e18c70 commit 4917a3cCopy full SHA for 4917a3c
src/client/streamableHttp.ts
@@ -401,10 +401,8 @@ export class StreamableHTTPClientTransport implements Transport {
401
402
if (!response.ok) {
403
if (response.status === 401 && this._authProvider) {
404
- const result = await auth(this._authProvider, { serverUrl: this._url });
405
- if (result !== "AUTHORIZED") {
406
- throw new UnauthorizedError();
407
- }
+ // Whether this is REDIRECT or AUTHORIZED, retry sending the message.
+ await auth(this._authProvider, { serverUrl: this._url });
408
409
// Purposely _not_ awaited, so we don't call onerror twice
410
return this.send(message);
0 commit comments