pub enum Error {
Show 66 variants
TableNotFound(String),
TableAlreadyExists(String),
TableClosed,
TableColumnsNotMatch {
expected: usize,
got: usize,
},
TableHasActiveTransactions,
ColumnNotFound(String),
AmbiguousColumn(String),
InvalidColumnType,
VectorDimensionMismatch {
expected: u16,
got: u16,
},
DuplicateColumn,
InvalidValue,
InvalidArgument(String),
AuthorizationDenied(String),
ValueTooLong {
column: String,
max: usize,
got: usize,
},
NotNullConstraint {
column: String,
},
PrimaryKeyConstraint {
row_id: i64,
},
UniqueConstraint {
index: String,
column: String,
value: String,
row_id: i64,
},
CheckConstraintViolation {
column: String,
expression: String,
},
ForeignKeyViolation {
table: String,
column: String,
ref_table: String,
ref_column: String,
detail: String,
},
TransactionNotStarted,
TransactionAlreadyStarted,
TransactionEnded,
TransactionAborted,
TransactionCommitted,
TransactionClosed,
InvalidTransactionTransition {
txn_id: i64,
expected: String,
actual: String,
},
TransactionSerializationConflict {
row_id: i64,
},
RowLockTimeout {
row_id: i64,
timeout_ms: u64,
},
CompactionBackpressure {
table: String,
segments: u64,
physical_bytes: u64,
hard_segments: u64,
hard_bytes: u64,
},
IndexNotFound(String),
IndexAlreadyExists(String),
IndexColumnNotFound,
IndexClosed,
EngineNotOpen,
EngineAlreadyOpen,
ViewAlreadyExists(String),
ViewNotFound(String),
LockAcquisitionFailed(String),
NoRowsReturned,
NoStatementsToExecute,
ColumnIndexOutOfBounds {
index: usize,
},
CursorNotPositioned,
WalNotRunning,
WalFileClosed,
WalDurabilityUncertain {
detail: String,
},
PartialCommit {
operation: String,
committed_rows: i64,
cause: String,
},
CopyTransactionMemoryLimit {
row: i64,
limit_bytes: usize,
attempted_bytes: usize,
},
WalNotInitialized,
DatabaseLocked,
CannotDropPrimaryKey,
NullComparison,
IncomparableTypes,
NotSupported(String),
NativeFunction {
function: String,
status: u32,
},
Navigation {
code: NavigationErrorCode,
detail: String,
},
SegmentNotFound,
ExpressionEvaluation,
ExpressionEvaluationWithMessage {
message: String,
},
TypeConversion {
from: String,
to: String,
},
Parse(String),
Io {
message: String,
},
Internal {
message: String,
},
TableOrViewNotFound(String),
Type(String),
DivisionByZero,
QueryCancelled,
}Expand description
Main error type for RadixDB storage operations
This enum covers all error cases including both sentinel errors and structured errors with context.
Variants§
TableNotFound(String)
Table not found in the database
TableAlreadyExists(String)
Table already exists when trying to create
TableClosed
Table has been closed and cannot be used
TableColumnsNotMatch
Table column count mismatch
TableHasActiveTransactions
Cannot truncate table because other transactions hold uncommitted writes
ColumnNotFound(String)
Column not found in table schema
AmbiguousColumn(String)
A result label resolves to more than one projected column.
InvalidColumnType
Invalid column type for operation
VectorDimensionMismatch
Vector dimension mismatch
DuplicateColumn
Duplicate column name in schema
InvalidValue
Invalid value for operation
InvalidArgument(String)
Invalid argument for function
AuthorizationDenied(String)
Authenticated Principal lacks authority for the requested operation.
ValueTooLong
Value exceeds maximum length
NotNullConstraint
NOT NULL constraint violation
PrimaryKeyConstraint
Primary key constraint violation
UniqueConstraint
Unique constraint violation
Fields
CheckConstraintViolation
CHECK constraint violation
ForeignKeyViolation
Foreign key constraint violation
TransactionNotStarted
Transaction has not been started
TransactionAlreadyStarted
Transaction has already been started
TransactionEnded
Transaction has already ended (committed or rolled back)
TransactionAborted
Transaction was aborted
TransactionCommitted
Transaction has already been committed
TransactionClosed
Transaction has been closed
InvalidTransactionTransition
A registry transition was requested for a missing transaction or from a state that cannot legally perform that transition.
TransactionSerializationConflict
Adding a row wait would close a cycle in the transaction wait graph.
RowLockTimeout
A row writer exceeded the bounded claim wait.
CompactionBackpressure
A table accumulated more uncompacted L0 work than the configured hard admission limit. The transaction has not published and may be retried.
IndexNotFound(String)
Index not found
IndexAlreadyExists(String)
Index already exists
IndexColumnNotFound
Column for index not found
IndexClosed
Index is closed
EngineNotOpen
Engine is not open
EngineAlreadyOpen
Engine is already open
ViewAlreadyExists(String)
View already exists
ViewNotFound(String)
View not found
LockAcquisitionFailed(String)
Failed to acquire lock
NoRowsReturned
Query returned no rows
NoStatementsToExecute
No statements to execute
ColumnIndexOutOfBounds
Column index out of bounds
CursorNotPositioned
A streaming cursor has no current row before its first successful advance or after end-of-stream.
WalNotRunning
WAL manager is not running
WalFileClosed
WAL file is closed
WalDurabilityUncertain
WAL bytes containing an outcome were written, but their durability could not be established. The transaction must be treated as terminal and callers must not assume rollback or safely retry the logical action.
PartialCommit
A bounded multi-transaction operation failed after publishing a durable prefix. Callers must not blindly retry the whole operation.
CopyTransactionMemoryLimit
One atomic COPY would exceed its configured resident-memory envelope.
WalNotInitialized
WAL not initialized
DatabaseLocked
Database is locked by another process
CannotDropPrimaryKey
Cannot drop primary key column
NullComparison
Cannot compare NULL with non-NULL value
IncomparableTypes
Cannot compare incompatible types
NotSupported(String)
Operation not supported
NativeFunction
A native extension function failed. Arguments and plugin-provided detail are deliberately excluded from this public diagnostic.
Navigable-reference contract failure with a stable machine category.
SegmentNotFound
Segment not found (internal storage error)
ExpressionEvaluation
Expression evaluation failed
ExpressionEvaluationWithMessage
Expression evaluation failed with message
TypeConversion
Type conversion error
Parse(String)
Parse error
Io
IO error (wrapped)
Internal
Internal error for unexpected conditions
TableOrViewNotFound(String)
Table or view not found (with name)
Type(String)
Type error
DivisionByZero
Division by zero
QueryCancelled
Query cancelled
Implementations§
Source§impl Error
impl Error
Sourcepub fn code(&self) -> ErrorCode
pub fn code(&self) -> ErrorCode
Return a stable machine-readable code without parsing presentation text.
Sourcepub fn context(&self) -> ErrorContext
pub fn context(&self) -> ErrorContext
Return neutral classification for protocol, API, and diagnostic mapping.
Sourcepub fn table_columns_not_match(expected: usize, got: usize) -> Self
pub fn table_columns_not_match(expected: usize, got: usize) -> Self
Create a new TableColumnsNotMatch error
Sourcepub fn value_too_long(column: impl Into<String>, max: usize, got: usize) -> Self
pub fn value_too_long(column: impl Into<String>, max: usize, got: usize) -> Self
Create a new ValueTooLong error
Sourcepub fn not_null_constraint(column: impl Into<String>) -> Self
pub fn not_null_constraint(column: impl Into<String>) -> Self
Create a new NotNullConstraint error
Sourcepub fn primary_key_constraint(row_id: i64) -> Self
pub fn primary_key_constraint(row_id: i64) -> Self
Create a new PrimaryKeyConstraint error
Sourcepub fn unique_constraint(
index: impl Into<String>,
column: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn unique_constraint( index: impl Into<String>, column: impl Into<String>, value: impl Into<String>, ) -> Self
Create a new UniqueConstraint error
Sourcepub fn foreign_key_violation(
table: impl Into<String>,
column: impl Into<String>,
ref_table: impl Into<String>,
ref_column: impl Into<String>,
detail: impl Into<String>,
) -> Self
pub fn foreign_key_violation( table: impl Into<String>, column: impl Into<String>, ref_table: impl Into<String>, ref_column: impl Into<String>, detail: impl Into<String>, ) -> Self
Create a new ForeignKeyViolation error
Sourcepub fn type_conversion(from: impl Into<String>, to: impl Into<String>) -> Self
pub fn type_conversion(from: impl Into<String>, to: impl Into<String>) -> Self
Create a new TypeConversion error
Sourcepub fn expression_evaluation(message: impl Into<String>) -> Self
pub fn expression_evaluation(message: impl Into<String>) -> Self
Create a new ExpressionEvaluationWithMessage error
Sourcepub fn invalid_argument(message: impl Into<String>) -> Self
pub fn invalid_argument(message: impl Into<String>) -> Self
Create a new InvalidArgument error
Create a stable authorization failure without exposing credentials or parameter values.
Create a stable navigable-reference error.
Return the stable navigable-reference category, if this is one.
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Check if this is a “not found” type error
Sourcepub fn is_constraint_violation(&self) -> bool
pub fn is_constraint_violation(&self) -> bool
Check if this is a constraint violation error
Sourcepub fn is_pk_or_unique_violation(&self) -> bool
pub fn is_pk_or_unique_violation(&self) -> bool
PK or UNIQUE violation only (excludes NOT NULL / FK).
Sourcepub fn is_transaction_error(&self) -> bool
pub fn is_transaction_error(&self) -> bool
Check if this is a transaction-related error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
The failed logical action did not publish and may be retried after the reported transient condition changes.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · 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
use the Display impl or to_string()