hydrus_ptr_client/
error.rs1use thiserror::Error;
2
3pub type Result<T> = std::result::Result<T, Error>;
4
5#[derive(Debug, Error)]
6pub enum Error {
7 #[error("reqwest error {0}")]
8 Reqwest(#[from] reqwest::Error),
9
10 #[error("api returned error response: {0}")]
11 Response(String),
12
13 #[error("failed to parse content as json: {0}")]
14 JSON(#[from] serde_json::Error),
15
16 #[error("io error {0}")]
17 Io(#[from] std::io::Error),
18
19 #[error("builder error: {0}")]
20 Builder(String),
21
22 #[error("malformed response")]
23 Malformed,
24
25 #[error("Missing property {0}")]
26 MissingProperty(String),
27}