using ColaFlow.Modules.Mcp.Contracts.JsonRpc;
namespace ColaFlow.Modules.Mcp.Domain.Exceptions;
///
/// Exception thrown when a requested resource is not found
/// Maps to JSON-RPC error code -32003 (NotFound)
/// HTTP 404 status code
///
public class McpNotFoundException : McpException
{
///
/// Initializes a new instance of the class
///
/// Type of resource (e.g., "Task", "Epic")
/// ID of the resource
public McpNotFoundException(string resourceType, string resourceId)
: base(JsonRpcErrorCode.NotFound, $"{resourceType} not found: {resourceId}")
{
}
///
/// Initializes a new instance of the class with custom message
///
/// Error message
/// Additional error data (optional)
public McpNotFoundException(string message, object? errorData = null)
: base(JsonRpcErrorCode.NotFound, message, errorData)
{
}
}