cielo_rs_sdk/
error.rs

1//! This module defines custom error types for the Cielo API.
2
3/// Custom error type for the Cielo API
4#[derive(Debug, thiserror::Error)]
5pub enum Error {
6    /// Error originating from the reqwest library
7    #[error("Reqwest error: {0}")]
8    Reqwest(#[from] reqwest::Error),
9
10    /// Error originating from the reqwest middleware
11    #[error("Reqwest middleware error: {0}")]
12    ReqwestMiddleware(#[from] reqwest_middleware::Error),
13
14    /// Error indicating that the response status was not 200 OK
15    #[error("Response status not 200: {0}")]
16    StatusNot200(String),
17}