mock_http_connector/
error.rs1use std::error::Error as StdError;
2
3use crate::case::Checkpoint;
4
5#[derive(Debug, thiserror::Error)]
7pub enum Error {
8 #[error("checkpoint error: {0:?}")]
10 Checkpoint(Vec<Checkpoint>),
11
12 #[error("hyper error: {0}")]
14 Hyper(#[from] crate::hyper::Error),
15
16 #[error("http error: {0}")]
18 Http(#[from] crate::hyper::http::Error),
19
20 #[cfg(feature = "hyper_1")]
22 #[error("hyper_util client error: {0}")]
23 HyperLegacy(#[from] hyper_util::client::legacy::Error),
24
25 #[error("httparse error: {0}")]
27 Httparse(#[from] httparse::Error),
28
29 #[cfg(feature = "json")]
31 #[error("JSON serde error: {0}")]
32 Json(#[from] serde_json::Error),
33
34 #[error("no cases matched the request: {0:?}")]
36 NotFound(crate::hyper::Request<String>),
37
38 #[error("transparent")]
40 Runtime(#[from] BoxError),
41}
42
43pub type BoxError = Box<dyn StdError + Send + Sync>;