sos_search/error.rs
1use sos_core::{SecretId, VaultId};
2use thiserror::Error;
3
4/// Errors generated by the library.
5#[derive(Debug, Error)]
6pub enum Error {
7 /// Error generated when a vault does not
8 /// contain a secret by identifier.
9 #[error("vault {0} does not contain {1}")]
10 NoSecretId(VaultId, SecretId),
11
12 /// Errors generated by the core library.
13 #[error(transparent)]
14 Core(#[from] sos_core::Error),
15
16 /// Errors generated by the vault library.
17 #[error(transparent)]
18 Vault(#[from] sos_vault::Error),
19
20 /// Errors generated by the backend library.
21 #[error(transparent)]
22 Backend(#[from] sos_backend::Error),
23}