pub enum RotationError {
WrongPhase {
current: RotationPhase,
expected: RotationPhase,
},
SameKey,
InvalidTransitionWindow,
TransitionStillOpen {
until: DateTime<Utc>,
},
NoRotationInProgress,
Encoding(String),
Signer(SignerError),
}Expand description
Errors the state machine can produce.
Variants§
WrongPhase
Tried to do something in the wrong phase (e.g. retire while still active). Hints at an operator misstep in the runbook.
Fields
current: RotationPhaseWhat phase the state machine is in.
expected: RotationPhaseWhat phase the operation expected.
SameKey
begin_handover was called with the same key id as the current
signer. A no-op rotation would still publish an event that
every host would refuse.
InvalidTransitionWindow
begin_handover was called with a non-positive transition
window. Hosts must have a real overlap window or rotation is
just an atomic swap from their perspective.
TransitionStillOpen
retire_old was called but the transition window hasn’t elapsed
yet. Tells the operator to wait or override (override is a
separate code path).
NoRotationInProgress
retire_old was called but no rotation has been started yet.
Encoding(String)
JCS encoding failed. Should be impossible for the fixed-shape payload, but propagated rather than panicked.
Signer(SignerError)
The underlying signer failed.
Trait Implementations§
Source§impl Debug for RotationError
impl Debug for RotationError
Source§impl Display for RotationError
impl Display for RotationError
Source§impl Error for RotationError
impl Error for RotationError
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()