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:
Copilot 2026-02-17 13:12:29 -08:00 • committed by GitHub
commit 186cb93630
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -460,7 +460,7 @@ public class TerminalTaskStatusTransitionTests : ClientServerTestBase
Assert.Equal(McpTaskStatus.Completed, taskStatus.Status);
// Act - Try to cancel a completed task
// Act - Try to cancel a completed task (should be idempotent)
var cancelResult = await client.CancelTaskAsync(taskId, cancellationToken: TestContext.Current.CancellationToken);
// Assert - Status should still be completed (not cancelled)
@ -500,7 +500,7 @@ public class TerminalTaskStatusTransitionTests : ClientServerTestBase
Assert.Equal(McpTaskStatus.Failed, taskStatus.Status);
// Act - Try to cancel a failed task
// Act - Try to cancel a failed task (should be idempotent)
var cancelResult = await client.CancelTaskAsync(taskId, cancellationToken: TestContext.Current.CancellationToken);
// Assert - Status should still be failed