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 aad2bad commit 26b4743Copy full SHA for 26b4743
src/client/auth.ts
@@ -170,11 +170,12 @@ export async function discoverOAuthMetadata(
170
"MCP-Protocol-Version": opts?.protocolVersion ?? LATEST_PROTOCOL_VERSION
171
}
172
});
173
- } catch {
174
- try {
+ } catch (error) {
+ // CORS errors come back as TypeError
175
+ if (error instanceof TypeError) {
176
response = await fetch(url);
177
- return undefined;
+ } else {
178
+ throw error;
179
180
181
0 commit comments