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
|
|
@ -424,8 +424,8 @@ Task operations may throw <xref:ModelContextProtocol.McpException> with these er
|
|||
|
||||
| Error Code | Scenario |
|
||||
|------------|----------|
|
||||
| `InvalidParams` | Invalid or nonexistent task ID |
|
||||
| `InvalidRequest` | Tool with `taskSupport: forbidden` called with task metadata, or tool with `taskSupport: required` called without task metadata |
|
||||
| `InvalidParams` | Invalid or nonexistent task ID or invalid cursor |
|
||||
| `InvalidParams` | Tool with `taskSupport: forbidden` called with task metadata, or tool with `taskSupport: required` called without task metadata |
|
||||
| `InternalError` | Task execution failure or result unavailable |
|
||||
|
||||
Example error handling:
|
||||
|
|
|
|||
Loading…
Reference in a new issue