|
cxxmcp 1.1.6
C++ MCP SDK
|
Structured error returned by fallible SDK operations. More...
#include <result.hpp>
Public Attributes | |
| int | code = 0 |
| Numeric protocol, transport, or component-specific error code. | |
| std::string | message |
| Short human-readable explanation of the failure. | |
| std::string | detail |
| Optional extended diagnostic information. | |
| std::string | category |
| Stable SDK error category such as "protocol", "transport", "handler", "timeout", or "cancellation". | |
Structured error returned by fallible SDK operations.
The numeric code is normally an MCP JSON-RPC error code or a transport-specific status chosen by the component that failed. message is intended for user-visible or log-friendly summaries, while detail can carry diagnostic text such as a nested exception message, validation failure, or transport response body.
| std::string mcp::core::Error::category |
Stable SDK error category such as "protocol", "transport", "handler", "timeout", or "cancellation".
Empty means the producer has not opted into categorized errors yet.