48 lines
1.1 KiB
Rust
48 lines
1.1 KiB
Rust
use thiserror::Error;
|
|
|
|
/// Error types for the ACLDB module
|
|
#[derive(Error, Debug)]
|
|
pub enum Error {
|
|
/// Permission denied error
|
|
#[error("Permission denied")]
|
|
PermissionDenied,
|
|
|
|
/// Record not found error
|
|
#[error("Record not found")]
|
|
NotFound,
|
|
|
|
/// Invalid operation error
|
|
#[error("Invalid operation: {0}")]
|
|
InvalidOperation(String),
|
|
|
|
/// Path error
|
|
#[error("Path error: {0}")]
|
|
PathError(String),
|
|
|
|
/// OurDB error
|
|
#[error("OurDB error: {0}")]
|
|
OurDBError(#[from] ourdb::Error),
|
|
|
|
/// TST error
|
|
#[error("TST error: {0}")]
|
|
TSTError(#[from] tst::Error),
|
|
|
|
/// IO error
|
|
#[error("IO error: {0}")]
|
|
IOError(#[from] std::io::Error),
|
|
|
|
/// Serialization error
|
|
#[error("Serialization error: {0}")]
|
|
SerializationError(#[from] serde_json::Error),
|
|
|
|
/// Signature verification error
|
|
#[error("Signature verification error: {0}")]
|
|
SignatureError(String),
|
|
|
|
/// Invalid request error
|
|
#[error("Invalid request: {0}")]
|
|
InvalidRequest(String),
|
|
}
|
|
|
|
|