cuprate_p2p_core/
error.rs1#[derive(Debug, thiserror::Error)]
2pub enum PeerError {
3 #[error("The connection timed out.")]
4 TimedOut,
5 #[error("The connection was closed.")]
6 ConnectionClosed,
7 #[error("The connection tasks client channel was closed")]
8 ClientChannelClosed,
9 #[error("error with peer response: {0}")]
10 ResponseError(&'static str),
11 #[error("the peer sent an incorrect response to our request")]
12 PeerSentIncorrectResponse,
13 #[error("the peer sent an invalid message")]
14 PeerSentInvalidMessage,
15 #[error("inner service error: {0}")]
16 ServiceError(#[from] tower::BoxError),
17 #[error("bucket error: {0}")]
18 BucketError(#[from] cuprate_wire::BucketError),
19 #[error("handshake error: {0}")]
20 Handshake(#[from] crate::client::HandshakeError),
21 #[error("i/o error: {0}")]
22 IO(#[from] std::io::Error),
23}