fix(server): call onerror callback for all transport errors (#1433)
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
0ed723748b
commit
78bae7426d
1 changed files with 218 additions and 9 deletions
5
.changeset/fix-onerror-callbacks.md
Normal file
5
.changeset/fix-onerror-callbacks.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@modelcontextprotocol/server': patch
|
||||
---
|
||||
|
||||
Fix transport errors being silently swallowed by adding missing `onerror` callback invocations before all `createJsonErrorResponse` calls in `WebStandardStreamableHTTPServerTransport`. This ensures errors like parse failures, invalid headers, and session validation errors are properly reported via the `onerror` callback.
|
||||
Loading…
Reference in a new issue