Clean up (use of) McpException and McpTransportException (#321)
* Clean up (use of) McpException * Replace McpTransportException with InvalidOperationException * Add cancellation test
This commit is contained in:
parent
d65ddce268
commit
7d77be68cf
1 changed files with 231 additions and 219 deletions
|
|
@ -176,7 +176,7 @@ builder.Services
|
|||
{
|
||||
if (ctx.Params?.Level is null)
|
||||
{
|
||||
throw new McpException("Missing required argument 'level'");
|
||||
throw new McpException("Missing required argument 'level'", McpErrorCode.InvalidParams);
|
||||
}
|
||||
|
||||
_minimumLoggingLevel = ctx.Params.Level;
|
||||
|
|
|
|||
Loading…
Reference in a new issue