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
|
|
@ -123,7 +123,7 @@ builder.Services
|
|||
{
|
||||
if (ctx.Params?.Level is null)
|
||||
{
|
||||
throw new McpException("Missing required argument 'level'", McpErrorCode.InvalidParams);
|
||||
throw new McpProtocolException("Missing required argument 'level'", McpErrorCode.InvalidParams);
|
||||
}
|
||||
|
||||
_minimumLoggingLevel = ctx.Params.Level;
|
||||
|
|
|
|||
Loading…
Reference in a new issue