hopr_transport_network/
errors.rs

1use thiserror::Error;
2
3/// Errors that can be generated by the crate.
4#[derive(Error, Debug)]
5pub enum NetworkingError {
6    #[error("performing an operation on own PeerId")]
7    DisallowedOperationOnOwnPeerIdError,
8    #[error("database or chain error: {0}")]
9    DbChainError(Box<dyn std::error::Error + Send + Sync + 'static>),
10}
11
12/// Result built on top of the crate error [NetworkingError]
13pub type Result<T> = core::result::Result<T, NetworkingError>;