49aa1dc36c
Signed-off-by: Catty Steve <4795515+Catty2014@user.noreply.gitee.com>
25 lines
569 B
Rust
25 lines
569 B
Rust
use thiserror::Error;
|
|
|
|
#[derive(Error, Debug)]
|
|
pub enum VaultError {
|
|
#[error("Vault not initialized")]
|
|
NotInitialized,
|
|
|
|
#[error("Vault operation failed: {0}")]
|
|
OperationFailed(String),
|
|
|
|
#[error("Authentication failed: {0}")]
|
|
AuthFailed(String),
|
|
|
|
#[error("Network error: {0}")]
|
|
NetworkError(String),
|
|
|
|
#[error("Serialization error: {0}")]
|
|
SerializationError(#[from] serde_json::Error),
|
|
|
|
#[error("Vault error: {0}")]
|
|
RvError(#[from] rusty_vault::errors::RvError),
|
|
}
|
|
|
|
pub type Result<T> = std::result::Result<T, VaultError>;
|