Better error messages. (#3835)

* Better error messages.

Right now, logged messages are hardly useful.

Together with https://github.com/paritytech/substrate/pull/9768, this
should help with debugging.

* cargo fmt
This commit is contained in:
Robert Klotzner authored and GitHub committed 2021-09-14 14:18:32 +02:00
1 parent 135d9ae931
commit de637b966a
1 file changed
+2 -2
@@ -82,11 +82,11 @@ pub type ResponseSender = oneshot::Sender<Result<Vec<u8>, network::RequestFailur
#[derive(Debug, Error)]
pub enum RequestError {
/// Response could not be decoded.
#[error("Response could not be decoded")]
#[error("Response could not be decoded: {0}")]
InvalidResponse(#[source] DecodingError),
/// Some error in substrate/libp2p happened.
#[error("Some network error occurred")]
#[error("{0}")]
NetworkError(#[source] network::RequestFailure),
/// Response got canceled by networking.