pub enum KmsError {
Unavailable(String),
Denied(String),
Tampered(String),
Invalid(String),
Refused(String),
}Expand description
Why a wrap or unwrap did not happen. The split that matters operationally is unavailable (retry, alarm on duration) against denied (do not retry, alarm immediately): they want different alarms and different retry behaviour, and a single opaque error makes a permissions mistake look like an outage for as long as it takes someone to read the logs.
Variants§
The KMS could not be reached, or answered that it is unwell. Retryable.
Denied(String)
The KMS was reached and refused: no permission on the key, or the key is disabled. Not retryable; a human has to change something.
Tampered(String)
The wrapped key did not authenticate: it was truncated, altered, or wrapped under a different master key. Never retryable, and never a reason to fall back to anything.
Invalid(String)
The caller passed something this port cannot accept.
Refused(String)
The provider refuses to run in this configuration.
Implementations§
Trait Implementations§
Source§impl Error for KmsError
impl Error for KmsError
1.30.0 · 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()