AI seeded comments from robch and then edited by stephentoub (#238)
* AI generated `///` comment updates * Fix compilation issues * Fix incorrect XML comment structure * Update all Client comments * Update all Configuration comments * Update all Messages comments * Update all Transport comments * Update all Types comments * Update all Server comments * Undo some commenting --------- Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
parent
07300389ee
commit
77871c5aac
1 changed files with 4017 additions and 1066 deletions
|
|
@ -1,26 +1,34 @@
|
|||
using System.Text.Json.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ModelContextProtocol.Protocol.Messages;
|
||||
|
||||
/// <summary>
|
||||
/// An error response message in the JSON-RPC protocol.
|
||||
/// Represents an error response message in the JSON-RPC protocol.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Error responses are sent when a request cannot be fulfilled or encounters an error during processing.
|
||||
/// Like successful responses, error messages include the same ID as the original request, allowing the
|
||||
/// sender to match errors with their corresponding requests.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// Each error response contains a structured error detail object with a numeric code, descriptive message,
|
||||
/// and optional additional data to provide more context about the error.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public record JsonRpcError : IJsonRpcMessageWithId
|
||||
{
|
||||
/// <summary>
|
||||
/// JSON-RPC protocol version. Always "2.0".
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
[JsonPropertyName("jsonrpc")]
|
||||
public string JsonRpc { get; init; } = "2.0";
|
||||
|
||||
/// <summary>
|
||||
/// Request identifier matching the original request.
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
[JsonPropertyName("id")]
|
||||
public required RequestId Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Error information.
|
||||
/// Gets detailed error information for the failed request, containing an error code,
|
||||
/// message, and optional additional data
|
||||
/// </summary>
|
||||
[JsonPropertyName("error")]
|
||||
public required JsonRpcErrorDetail Error { get; init; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue