fix: convert remaining capability throws to SdkError by felixweinberger · Pull Request #1761 · modelcontextprotocol/typescript-sdk
Follow-up to #1454. Converts the 6 capability-assertion call sites that were missed to throw SdkError(SdkErrorCode.CapabilityNotSupported, ...) instead of plain Error: - Client.assertCapability() in packages/client/src/client/client.ts - assertToolsCallTaskCapability() in experimental/tasks/helpers.ts (2 throws) - assertClientRequestTaskCapability() in experimental/tasks/helpers.ts (3 throws) Fixes #430 Closes #1329 Co-authored-by: Matteo Gobbo <info@matteogobbo.it>
Adds the 3 capability checks in experimental/tasks/server.ts that were missed in the initial sweep: sampling tools (L125), url elicitation (L224), form elicitation (L230). Co-authored-by: Matteo Gobbo <info@matteogobbo.it>
This was referenced
Mar 27, 2026This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters