pub struct ErrorCode {
pub code: i32,
pub message: &'static str,
}
Expand description
Predefined error codes for common JSON-RPC and ACP-specific errors.
These codes follow the JSON-RPC 2.0 specification for standard errors and use the reserved range (-32000 to -32099) for protocol-specific errors.
Fields§
§code: i32
The numeric error code.
message: &'static str
The standard error message for this code.
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const PARSE_ERROR: ErrorCode
pub const PARSE_ERROR: ErrorCode
Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
Sourcepub const INVALID_REQUEST: ErrorCode
pub const INVALID_REQUEST: ErrorCode
The JSON sent is not a valid Request object.
Sourcepub const METHOD_NOT_FOUND: ErrorCode
pub const METHOD_NOT_FOUND: ErrorCode
The method does not exist or is not available.
Sourcepub const INVALID_PARAMS: ErrorCode
pub const INVALID_PARAMS: ErrorCode
Invalid method parameter(s).
Sourcepub const INTERNAL_ERROR: ErrorCode
pub const INTERNAL_ERROR: ErrorCode
Internal JSON-RPC error. Reserved for implementation-defined server errors.
Sourcepub const AUTH_REQUIRED: ErrorCode
pub const AUTH_REQUIRED: ErrorCode
Authentication is required before this operation can be performed. This is an ACP-specific error code in the reserved range.
Sourcepub const RESOURCE_NOT_FOUND: ErrorCode
pub const RESOURCE_NOT_FOUND: ErrorCode
A given resource, such as a file, was not found. This is an ACP-specific error code in the reserved range.
Trait Implementations§
Source§impl Deserialize<'static> for ErrorCode
impl Deserialize<'static> for ErrorCode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'static>,
Source§impl JsonSchema for ErrorCode
impl JsonSchema for ErrorCode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref
keyword. Read more