Skip to content

fix: handle aborted responses without unhandled rejections#168

Open
morgan-coded wants to merge 1 commit into
vercel:mainfrom
morgan-coded:fix/128-abort-crash
Open

fix: handle aborted responses without unhandled rejections#168
morgan-coded wants to merge 1 commit into
vercel:mainfrom
morgan-coded:fix/128-abort-crash

Conversation

@morgan-coded

Copy link
Copy Markdown

Client aborts could leave mcp-handler with an unhandled rejection if the request handler or response builder failed after the response stream was already gone.
This catches those late failures, ignores expected abort-driven errors when the request signal is aborted, and keeps non-abort failures logged instead of surfacing as process-level unhandled rejections. It also guards late stream writes and closes after abort.
I added regression coverage for the abort path, late writes after abort, and the normal response path. The focused adapter test passes, the full test suite passes 33/33, and build, TypeScript, and changeset status are clean.

Fixes #128

Copilot AI review requested due to automatic review settings June 26, 2026 06:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Server is crashing if the client aborts the request before response is sent

2 participants