Skip to main content

miden_client/note_transport/
errors.rs

1use alloc::boxed::Box;
2use alloc::string::String;
3use core::error::Error;
4
5use miden_protocol::utils::DeserializationError;
6use thiserror::Error;
7
8#[derive(Debug, Error)]
9pub enum NoteTransportError {
10    #[error(
11        "note transport is disabled; enable it in the client configuration to send or receive notes via P2P"
12    )]
13    Disabled,
14    #[error("connection error: {0}")]
15    Connection(#[source] Box<dyn Error + Send + Sync + 'static>),
16    #[error("deserialization error: {0}")]
17    Deserialization(#[from] DeserializationError),
18    #[error("note transport network error: {0}")]
19    Network(String),
20}