Skip to main content

contentstack_api_client_rs/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum ClientError {
5    #[error("HTTP error: {0}")]
6    Http(#[from] reqwest::Error),
7    #[error("Middleware error: {0}")]
8    Middleware(#[from] reqwest_middleware::Error),
9    #[error("Rate limited")]
10    RateLimit,
11    #[error("Unauthorized - check your keys")]
12    Unauthorized,
13}
14
15pub type Result<T> = std::result::Result<T, ClientError>;