Update McpErrorCode XML docs and fix error code usage to align with MCP spec (#1291)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
This commit is contained in:
parent
5651e9ebfe
commit
186cb93630
1 changed files with 30 additions and 17 deletions
|
|
@ -526,8 +526,8 @@ public class ToolTaskSupportTests : LoggedTest
|
|||
arguments: new Dictionary<string, object?> { ["input"] = "test" },
|
||||
cancellationToken: TestContext.Current.CancellationToken).AsTask());
|
||||
|
||||
// The server returns MethodNotFound because direct invocation is not allowed for required-task tools
|
||||
Assert.Equal(McpErrorCode.MethodNotFound, exception.ErrorCode);
|
||||
// The server returns InvalidParams because direct invocation is not allowed for required-task tools
|
||||
Assert.Equal(McpErrorCode.InvalidParams, exception.ErrorCode);
|
||||
Assert.Contains("task", exception.Message, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue