moq_api/error.rs
1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum ApiError {
5 #[error("redis error: {0}")]
6 Redis(#[from] redis::RedisError),
7
8 #[error("reqwest error: {0}")]
9 Request(#[from] reqwest::Error),
10
11 #[error("hyper error: {0}")]
12 Hyper(#[from] hyper::Error),
13
14 #[error("url error: {0}")]
15 Url(#[from] url::ParseError),
16
17 #[error("io error: {0}")]
18 Io(#[from] std::io::Error),
19}