schema_registry_api/service/error.rs
1use crate::ApiError;
2
3/// A schema registry error
4#[derive(Debug, thiserror::Error)]
5pub enum SchemaRegistryError {
6 /// An error with reqwest
7 #[error(transparent)]
8 ReqwestError(#[from] reqwest::Error),
9
10 /// An error with reqwest middleware
11 #[error(transparent)]
12 ReqwestMiddlewareError(#[from] reqwest_middleware::Error),
13
14 /// An error when building an URL
15 #[error(transparent)]
16 UrlError(#[from] url::ParseError),
17
18 /// An API error
19 #[error(transparent)]
20 ApiError(#[from] ApiError),
21
22 /// A schema registry error
23 #[error("Schema registry error {0}")]
24 SchemaRegistryError(String),
25}