using ColaFlow.Modules.Mcp.Contracts.JsonRpc;

namespace ColaFlow.Modules.Mcp.Domain.Exceptions;

/// <summary>
/// Exception thrown when request validation fails
/// Maps to JSON-RPC error code -32004 (ValidationFailed)
/// HTTP 422 status code
/// </summary>
public class McpValidationException : McpException
{
    /// <summary>
    /// Initializes a new instance of the <see cref="McpValidationException"/> class
    /// </summary>
    /// <param name="message">Error message</param>
    /// <param name="errorData">Additional error data (optional, e.g., validation errors dictionary)</param>
    public McpValidationException(string message = "Validation failed", object? errorData = null)
        : base(JsonRpcErrorCode.ValidationFailed, message, errorData)
    {
    }
}
