#[repr(i32)]pub enum ErrorCode {
ParseError = -32_700,
InvalidRequest = -32_600,
MethodNotFound = -32_601,
InvalidParams = -32_602,
InternalError = -32_603,
ServerNotInitialized = -32_002,
UnknownErrorCode = -32_001,
RequestFailed = -32_000,
}
Expand description
Error codes as defined in the MCP protocol.
These error codes are based on the JSON-RPC 2.0 specification with additional MCP-specific error codes in the -32000 to -32099 range.
Variants§
ParseError = -32_700
Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
InvalidRequest = -32_600
The JSON sent is not a valid Request object.
MethodNotFound = -32_601
The method does not exist / is not available.
InvalidParams = -32_602
Invalid method parameter(s).
InternalError = -32_603
Internal JSON-RPC error.
ServerNotInitialized = -32_002
Server has not been initialized. This error is returned when a request is made before the server has been properly initialized.
UnknownErrorCode = -32_001
Unknown error code. This error is returned when an error code is received that is not recognized by the implementation.
RequestFailed = -32_000
Request failed. This error is returned when a request fails for a reason not covered by other error codes.