Add `MessageTypeUnhandled` to `AdminError`
Adds a `MessageTypeUnhandled` to the `AdminError` to display when the
admin service receives a message with a type that is not handled.
@@ -298,6 +298,8 @@ impl std::fmt::Display for AdminConsensusManagerError {
pub enum AdminError {
ConsensusFailed(AdminConsensusManagerError),
MessageTypeUnset,
+ #[cfg(not(feature = "circuit-disband"))]
+ MessageTypeUnhandled,
}
impl Error for AdminError {
@@ -305,6 +307,8 @@ impl Error for AdminError {
match self {
AdminError::ConsensusFailed(err) => Some(err),
AdminError::MessageTypeUnset => None,
+ #[cfg(not(feature = "circuit-disband"))]
+ AdminError::MessageTypeUnhandled => None,
}
}
}
@@ -314,6 +318,8 @@ impl std::fmt::Display for AdminError {
match self {
AdminError::ConsensusFailed(err) => write!(f, "admin consensus failed: {}", err),
AdminError::MessageTypeUnset => write!(f, "received message with unset type"),
+ #[cfg(not(feature = "circuit-disband"))]
+ AdminError::MessageTypeUnhandled => write!(f, "unable to handle the message"),
}
}
}
