#[non_exhaustive]pub enum SecretError {
NotFound,
Backend {
backend: &'static str,
source: Box<dyn Error + Send + Sync>,
},
InvalidUri(String),
DecodeFailed(String),
Unavailable {
backend: &'static str,
source: Box<dyn Error + Send + Sync>,
},
DataLost {
backend: &'static str,
message: String,
},
AlgorithmMismatch {
expected: &'static str,
actual: String,
},
}Expand description
Errors returned by secret store operations.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound
Backend returned no secret for this name/path.
Backend
Backend encountered a permanent error — retrying will not help.
Examples: authentication failure, permission denied, malformed request, the named secret was deleted. Callers should surface this to the operator or abort rather than retrying automatically.
For transient failures where a retry may succeed (network timeouts,
5xx responses, temporary outages), use Unavailable.
InvalidUri(String)
URI was syntactically invalid or named an unknown/disabled backend.
DecodeFailed(String)
Secret was present but could not be decoded as expected.
Backend is temporarily unavailable — retrying may succeed.
Examples: network timeout, DNS failure, connection refused, HTTP 5xx from a remote secrets service. Callers should implement retry with back-off rather than failing immediately.
For permanent errors that will not resolve on retry, use
Backend.
DataLost
Data was irrecoverably lost during a write operation.
The backend deleted existing data but failed to write the replacement. The original data is permanently gone. Callers should log an alert and may need to recreate the lost entry.
message describes what was lost (e.g. an object ID or key name).
AlgorithmMismatch
The backend’s key algorithm does not match what the caller expected.
Returned by adapter layers (e.g. secretx-signature) when a
SigningBackend is wrapped in a typed signer for a different algorithm.
Trait Implementations§
Source§impl Debug for SecretError
impl Debug for SecretError
Source§impl Display for SecretError
impl Display for SecretError
Source§impl Error for SecretError
impl Error for SecretError
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()