moq_api/error.rs
1// SPDX-FileCopyrightText: 2024-2026 Cloudflare Inc., Luke Curley, Mike English and contributors
2// SPDX-FileCopyrightText: 2023-2024 Luke Curley and contributors
3// SPDX-License-Identifier: MIT OR Apache-2.0
4
5use thiserror::Error;
6
7#[derive(Error, Debug)]
8pub enum ApiError {
9 #[error("redis error: {0}")]
10 Redis(#[from] redis::RedisError),
11
12 #[error("reqwest error: {0}")]
13 Request(#[from] reqwest::Error),
14
15 #[error("hyper error: {0}")]
16 Hyper(#[from] hyper::Error),
17
18 #[error("url error: {0}")]
19 Url(#[from] url::ParseError),
20
21 #[error("io error: {0}")]
22 Io(#[from] std::io::Error),
23}