More descriptive errors. (#9768)

This commit is contained in:
Robert Klotzner
2021-09-13 14:02:00 +02:00
committed by GitHub
parent d5d6d79e37
commit 2c36adf898
@@ -778,16 +778,16 @@ pub enum RequestFailure {
/// The remote replied, but the local node is no longer interested in the response.
Obsolete,
/// Problem on the network.
#[display(fmt = "Problem on the network")]
Network(#[error(ignore)] OutboundFailure),
#[display(fmt = "Problem on the network: {}", _0)]
Network(OutboundFailure),
}
/// Error when processing a request sent by a remote.
#[derive(Debug, derive_more::Display, derive_more::Error)]
pub enum ResponseFailure {
/// Problem on the network.
#[display(fmt = "Problem on the network")]
Network(#[error(ignore)] InboundFailure),
#[display(fmt = "Problem on the network: {}", _0)]
Network(InboundFailure),
}
/// Implements the libp2p [`RequestResponseCodec`] trait. Defines how streams of bytes are turned