fix: prevent in-process callback failures from breaking calls - #3436
fix: prevent in-process callback failures from breaking calls#34361fanwang wants to merge 1 commit into
Conversation
Signed-off-by: 1fanwang <1fannnw@gmail.com>
|
This PR has been closed automatically. This repo only keeps pull requests open when they come from a maintainer, or from a contributor a maintainer has assigned to the linked issue, and you aren't currently assigned to #3434. If a maintainer assigns you to #3434, this PR reopens on its own and there's nothing more you need to do here. Assignment is a maintainer call based on capacity; comments that only ask to be assigned don't factor in. What does help is engaging on the issue itself by confirming the repro, explaining why it matters for your use case, or describing the approach you'd take. You're welcome to keep pushing commits here (just avoid force-pushing, since GitHub can't reopen a rewritten branch), but that on its own won't get the PR reviewed or the issue assigned, and realistically most auto-closed PRs stay closed. There's no need to open a new PR either way. CONTRIBUTING.md has the full reasoning, but in short:
Maintainers: reopen, remove |
Fixes #3434
With an in-process client, a progress callback exception turns a successful tool call into
UnexpectedToolError. Notification handler exceptions also escape throughnotify().DirectDispatchernow logs and contains those failures, matchingJSONRPCDispatcher.Motivation and Context
The transport should not let callback code change a protocol outcome. Request handler failures still become
MCPError.How Has This Been Tested?
The contract tests fail on clean
origin/mainwith only the tests applied, then pass with the fix.Raw logs
Breaking Changes
None.
Types of changes
Checklist
help wantedlabel.Additional context
I used GitHub Copilot CLI to inspect the dispatcher paths, write the patch and tests, and draft this pull request. I reviewed the change and verified the results.