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>
This commit is contained in:
parent
b2326afea6
commit
4b5fdcba02
1 changed files with 63 additions and 1 deletions
7
.changeset/oauth-error-http200.md
Normal file
7
.changeset/oauth-error-http200.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
'@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.
|
||||
Loading…
Reference in a new issue