hopr_transport_probe/
errors.rs1use libp2p_identity::PeerId;
2use thiserror::Error;
3
4#[derive(Error, Debug)]
5pub enum ProbeError {
6 #[error("the network operation timed out for peer {0:?}")]
7 ProbeNeighborTimeout(PeerId),
8
9 #[error("failed loopback probe")]
10 ProbeLoopbackTimeout(crate::content::PathTelemetry),
11
12 #[error("error while decoding message data")]
13 DecodingError,
14
15 #[error("peer does not exist")]
16 NonExistingPeer,
17
18 #[error("error while pinging peer {0}: {1}")]
19 PingerError(PeerId, String),
20
21 #[error("error sending probe: {0}")]
22 SendError(String),
23 #[error(transparent)]
24 ApplicationLayerError(#[from] hopr_protocol_app::errors::ApplicationLayerError),
25}
26
27pub type Result<T> = core::result::Result<T, ProbeError>;