typescript-sdk/.changeset/oauth-error-http200.md
Christopher Tso 4b5fdcba02
fix: handle OAuth error responses returned with HTTP 200 status (#1343)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Paul Carleton <paulcarletonjr@gmail.com>
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
2026-01-26 15:13:34 +00:00

367 B

@modelcontextprotocol/client
patch

Fix OAuth error handling for servers returning errors with HTTP 200 status

Some OAuth servers (e.g., GitHub) return error responses with HTTP 200 status instead of 4xx. The SDK now checks for an error field in the JSON response before attempting to parse it as tokens, providing users with meaningful error messages.