pub enum RragError {
Show 14 variants
DocumentProcessing {
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Embedding {
content_type: String,
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Storage {
operation: String,
source: Box<dyn Error + Send + Sync>,
},
RsllmClient {
operation: String,
source: Box<dyn Error + Send + Sync>,
},
Retrieval {
query: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
ToolExecution {
tool: String,
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Configuration {
field: String,
expected: String,
actual: String,
},
Network {
operation: String,
source: Box<dyn Error + Send + Sync>,
},
Serialization {
data_type: String,
source: Error,
},
Timeout {
operation: String,
duration_ms: u64,
},
Memory {
operation: String,
message: String,
},
Stream {
context: String,
message: String,
},
Agent {
agent_id: String,
message: String,
source: Option<Box<dyn Error + Send + Sync>>,
},
Validation {
field: String,
constraint: String,
value: String,
},
}Expand description
Main error type for RRAG operations
Designed with Rust’s error handling best practices:
- Uses
thiserrorfor automatic trait implementations - Provides structured error data for programmatic handling
- Includes source chain for debugging
- Categorizes errors for metrics and logging
Variants§
DocumentProcessing
Document processing errors
Fields
Embedding
Embedding generation errors
Fields
Storage
Vector storage errors
Fields
RsllmClient
rsllm client errors
Fields
Retrieval
Retrieval/search errors
Fields
ToolExecution
Tool execution errors
Fields
Configuration
Configuration errors
Fields
Network
Network/IO errors
Fields
Serialization
Serialization/deserialization errors
Fields
Timeout
Timeout errors
Fields
Memory
Memory/conversation errors
Fields
Stream
Streaming errors
Fields
Agent
Agent execution errors
Fields
Validation
Validation errors
Implementations§
Source§impl RragError
impl RragError
Sourcepub fn document_processing(message: impl Into<String>) -> Self
pub fn document_processing(message: impl Into<String>) -> Self
Create a document processing error
Sourcepub fn document_processing_with_source(
message: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn document_processing_with_source( message: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
Create a document processing error with source
Sourcepub fn embedding(
content_type: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn embedding( content_type: impl Into<String>, message: impl Into<String>, ) -> Self
Create an embedding error
Sourcepub fn storage(
operation: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn storage( operation: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
Create a storage error
Sourcepub fn rsllm_client(
operation: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn rsllm_client( operation: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
Create an rsllm client error
Sourcepub fn evaluation(message: impl Into<String>) -> Self
pub fn evaluation(message: impl Into<String>) -> Self
Create an evaluation error
Sourcepub fn tool_execution(
tool: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn tool_execution( tool: impl Into<String>, message: impl Into<String>, ) -> Self
Create a tool execution error
Sourcepub fn config(
field: impl Into<String>,
expected: impl Into<String>,
actual: impl Into<String>,
) -> Self
pub fn config( field: impl Into<String>, expected: impl Into<String>, actual: impl Into<String>, ) -> Self
Create a configuration error
Sourcepub fn memory(operation: impl Into<String>, message: impl Into<String>) -> Self
pub fn memory(operation: impl Into<String>, message: impl Into<String>) -> Self
Create a memory error
Sourcepub fn stream(context: impl Into<String>, message: impl Into<String>) -> Self
pub fn stream(context: impl Into<String>, message: impl Into<String>) -> Self
Create a stream error
Sourcepub fn agent(agent_id: impl Into<String>, message: impl Into<String>) -> Self
pub fn agent(agent_id: impl Into<String>, message: impl Into<String>) -> Self
Create an agent error
Sourcepub fn validation(
field: impl Into<String>,
constraint: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn validation( field: impl Into<String>, constraint: impl Into<String>, value: impl Into<String>, ) -> Self
Create a validation error
Sourcepub fn network(
operation: impl Into<String>,
source: impl Error + Send + Sync + 'static,
) -> Self
pub fn network( operation: impl Into<String>, source: impl Error + Send + Sync + 'static, ) -> Self
Create a network error
Sourcepub fn configuration(message: impl Into<String>) -> Self
pub fn configuration(message: impl Into<String>) -> Self
Create a configuration error (shorthand for config method)
Sourcepub fn serialization_with_message(
data_type: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn serialization_with_message( data_type: impl Into<String>, message: impl Into<String>, ) -> Self
Create a serialization error with message
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error suggests a retry might succeed
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
Get error severity level
Trait Implementations§
Source§impl Error for RragError
impl Error for RragError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<GraphError> for RragError
impl From<GraphError> for RragError
Source§fn from(err: GraphError) -> Self
fn from(err: GraphError) -> Self
Source§impl From<RsllmError> for RragError
Available on crate feature rexis-llm-client only.
impl From<RsllmError> for RragError
rexis-llm-client only.