using ColaFlow.Modules.Mcp.Contracts.JsonRpc;

namespace ColaFlow.Modules.Mcp.Domain.Exceptions;

/// <summary>
/// Exception thrown when the JSON sent is not a valid Request object
/// Maps to JSON-RPC error code -32600 (InvalidRequest)
/// </summary>
public class McpInvalidRequestException : McpException
{
    /// <summary>
    /// Initializes a new instance of the <see cref="McpInvalidRequestException"/> class
    /// </summary>
    /// <param name="message">Error message</param>
    /// <param name="errorData">Additional error data (optional)</param>
    public McpInvalidRequestException(string message = "Invalid Request", object? errorData = null)
        : base(JsonRpcErrorCode.InvalidRequest, message, errorData)
    {
    }
}
