1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum KvError {
5 #[error("Key Vault configuration error: {0}")]
7 Config(String),
8
9 #[error("authentication failed: {0}")]
11 Auth(String),
12
13 #[error("secret not found in Key Vault: {0}")]
15 NotFound(String),
16
17 #[error("Key Vault HTTP {status}: {message}")]
19 Http { status: u16, message: String },
20
21 #[error("transport error: {0}")]
23 Transport(String),
24
25 #[error(
28 "secret '{0}' is in a soft-deleted but recoverable state in Azure Key Vault — \
29 recover or purge it in the Azure portal (Portal > Key Vault > Deleted secrets) before retrying"
30 )]
31 SoftDeleted(String),
32}