Propagate tool call exceptions through filters (#844)
* Add McpProtocolException specifically for JSON-RPC errors
This commit is contained in:
parent
2c9558cf21
commit
3255adb4d6
1 changed files with 334 additions and 163 deletions
|
|
@ -87,7 +87,7 @@ public class DiagnosticTests
|
|||
await RunConnected(async (client, server) =>
|
||||
{
|
||||
await client.CallToolAsync("Throw", cancellationToken: TestContext.Current.CancellationToken);
|
||||
await Assert.ThrowsAsync<McpException>(async () => await client.CallToolAsync("does-not-exist", cancellationToken: TestContext.Current.CancellationToken));
|
||||
await Assert.ThrowsAsync<McpProtocolException>(async () => await client.CallToolAsync("does-not-exist", cancellationToken: TestContext.Current.CancellationToken));
|
||||
}, new List<string>());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue