using ColaFlow.Modules.Mcp.Contracts.JsonRpc;

namespace ColaFlow.Modules.Mcp.Domain.Exceptions;

/// <summary>
/// Exception thrown when authentication fails
/// Maps to JSON-RPC error code -32001 (Unauthorized)
/// HTTP 401 status code
/// </summary>
public class McpUnauthorizedException : McpException
{
    /// <summary>
    /// Initializes a new instance of the <see cref="McpUnauthorizedException"/> class
    /// </summary>
    /// <param name="message">Error message</param>
    /// <param name="errorData">Additional error data (optional)</param>
    public McpUnauthorizedException(string message = "Unauthorized", object? errorData = null)
        : base(JsonRpcErrorCode.Unauthorized, message, errorData)
    {
    }
}
