namespace ColaFlow.Modules.Mcp.Contracts.JsonRpc;

/// <summary>
/// JSON-RPC 2.0 error codes
/// </summary>
public enum JsonRpcErrorCode
{
    /// <summary>
    /// Invalid JSON was received by the server (-32700)
    /// </summary>
    ParseError = -32700,

    /// <summary>
    /// The JSON sent is not a valid Request object (-32600)
    /// </summary>
    InvalidRequest = -32600,

    /// <summary>
    /// The method does not exist or is not available (-32601)
    /// </summary>
    MethodNotFound = -32601,

    /// <summary>
    /// Invalid method parameter(s) (-32602)
    /// </summary>
    InvalidParams = -32602,

    /// <summary>
    /// Internal JSON-RPC error (-32603)
    /// </summary>
    InternalError = -32603,

    /// <summary>
    /// Authentication failed (-32001)
    /// </summary>
    Unauthorized = -32001,

    /// <summary>
    /// Authorization failed (-32002)
    /// </summary>
    Forbidden = -32002,

    /// <summary>
    /// Resource not found (-32003)
    /// </summary>
    NotFound = -32003,

    /// <summary>
    /// Request validation failed (-32004)
    /// </summary>
    ValidationFailed = -32004
}
