use pezsc_network_types::PeerId;
use codec::Error as DecodingError;
#[allow(missing_docs)]
#[fatality::fatality(splitable)]
pub enum Error {
#[fatal]
#[error("Incoming request channel got closed.")]
RequestChannelExhausted,
#[error("Decoding request failed for peer {0}.")]
DecodingError(PeerId, #[source] DecodingError),
#[error("Decoding request failed for peer {0}, and changing reputation failed.")]
DecodingErrorNoReputationChange(PeerId, #[source] DecodingError),
}
pub type Result<T> = std::result::Result<T, Error>;