miden_node_utils/
errors.rs1use thiserror::Error;
2use tonic::transport::Error as TransportError;
3
4#[derive(Debug, Error)]
5pub enum ApiError {
6 #[error("an I/O error has occurred")]
7 IoError(#[from] std::io::Error),
8
9 #[error("initialisation of the Api has failed: {0}")]
10 ApiInitialisationFailed(String),
11
12 #[error("serving the Api server has failed")]
13 ApiServeFailed(#[from] TransportError),
14
15 #[error("resolution of the server address has failed: {0}")]
16 AddressResolutionFailed(String),
17
18 #[error("converting the `Endpoint` into a socket address failed: {0}")]
20 EndpointToSocketFailed(std::io::Error),
21
22 #[error("connection to the database has failed: {0}")]
23 DatabaseConnectionFailed(String),
24
25 #[error("parsing store url failed: {0}")]
26 InvalidStoreUrl(String),
27}