cxxmcp 1.1.6
C++ MCP SDK
Loading...
Searching...
No Matches
error.hpp File Reference

Stable public error helpers for SDK request and dispatch paths. More...

#include <chrono>
#include <string>
#include <utility>
#include "cxxmcp/core/result.hpp"
#include "cxxmcp/protocol/types.hpp"

Go to the source code of this file.

Functions

core::Error mcp::errors::make (protocol::ErrorCode code, std::string message, std::string detail={}, std::string category={})
 
core::Error mcp::errors::parse (std::string detail={})
 
core::Error mcp::errors::invalid_request (std::string detail={})
 
core::Error mcp::errors::invalid_params (std::string detail={})
 
core::Error mcp::errors::method_not_found (std::string detail={})
 
core::Error mcp::errors::tool_not_found (std::string detail={})
 
core::Error mcp::errors::resource_not_found (std::string detail={})
 
core::Error mcp::errors::permission_denied (std::string detail={})
 
core::Error mcp::errors::rate_limited (std::string detail={})
 
core::Error mcp::errors::url_elicitation_required (std::string detail={})
 
core::Error mcp::errors::handler_failed (std::string detail={})
 
core::Error mcp::errors::handler_unknown_exception ()
 
core::Error mcp::errors::transport_failed (std::string detail={})
 
core::Error mcp::errors::transport_closed (std::string detail={})
 
core::Error mcp::errors::transport_unexpected_response (std::string detail={})
 
core::Error mcp::errors::transport_duplicate_request (std::string detail={})
 
core::Error mcp::errors::request_cancelled ()
 
core::Error mcp::errors::request_timed_out (std::chrono::milliseconds timeout)
 
core::Error mcp::errors::request_task_missing ()
 
core::Error mcp::errors::request_state_missing ()
 
core::Error mcp::errors::request_worker_exception (std::string detail={})
 
core::Error mcp::errors::request_worker_unknown_exception ()
 
protocol::ErrorObject mcp::errors::to_json_rpc_error (const core::Error &error)
 

Detailed Description

Stable public error helpers for SDK request and dispatch paths.

Public cxxmcp APIs return core::Result<T> instead of throwing. These helpers keep common protocol, transport, timeout, cancellation, and handler failures on stable JSON-RPC-compatible codes and message strings.