Skip to content

Comments

Add missing exception documentation for public APIs#1339

Merged
stephentoub merged 4 commits intomainfrom
copilot/add-exception-documentation-again
Feb 21, 2026
Merged

Add missing exception documentation for public APIs#1339
stephentoub merged 4 commits intomainfrom
copilot/add-exception-documentation-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 20, 2026

Adds missing <exception cref="McpException"> XML documentation to public methods that call SendRequestAsync or SendNotificationAsync but were not documenting the exception. All other public methods in both files already correctly document this exception — these were all task-related methods that were likely added together and missed the pattern.

Methods fixed in McpClient.Methods.cs

  • GetTaskResultAsync
  • GetTaskAsync
  • ListTasksAsync (both the convenience and raw ListTasksRequestParams overloads)
  • CancelTaskAsync

Methods fixed in McpServer.Methods.cs

  • NotifyTaskStatusAsync

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
@stephentoub
Copy link
Contributor

@copilot is this really the only missing exception comment? Please search for others.

@stephentoub stephentoub marked this pull request as ready for review February 21, 2026 01:57
…TaskAsync, and NotifyTaskStatusAsync

Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 21, 2026

@copilot is this really the only missing exception comment? Please search for others.

Found 4 more missing McpException docs (in addition to the one already fixed). All are task-related methods that were added together and missed the pattern. Fixed in faab35e:

  • McpClient.GetTaskAsync — calls SendRequestAsync
  • McpClient.ListTasksAsync (both overloads) — calls SendRequestAsync
  • McpClient.CancelTaskAsync — calls SendRequestAsync
  • McpServer.NotifyTaskStatusAsync — calls SendNotificationAsync

All other public methods in both files already had the documentation.

Copilot AI changed the title [WIP] Add missing exception documentation for public APIs Add missing exception documentation for public APIs Feb 21, 2026
@stephentoub stephentoub merged commit 34d4cd7 into main Feb 21, 2026
8 of 10 checks passed
@stephentoub stephentoub deleted the copilot/add-exception-documentation-again branch February 21, 2026 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants