ipfs_api_backend_hyper/
error.rs1use thiserror::Error;
10
11#[derive(Debug, Error)]
12pub enum Error {
13 #[error("api returned error `{0}`")]
14 Api(ipfs_api_prelude::ApiError),
15
16 #[error("hyper client error `{0}`")]
17 Client(#[from] hyper::Error),
18
19 #[error("http error `{0}`")]
20 Http(#[from] http::Error),
21
22 #[error("ipfs client error `{0}`")]
23 IpfsClientError(#[from] ipfs_api_prelude::Error),
24}
25
26impl From<ipfs_api_prelude::ApiError> for Error {
27 fn from(err: ipfs_api_prelude::ApiError) -> Self {
28 Error::Api(err)
29 }
30}