zenlayercloud_sdk/
errors.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

#[derive(Debug, thiserror::Error)]
pub enum Error {
    #[error("requestId:{request_id:?}, http_status:{http_status:?}, code:{code:?}, message:{message:?}")]
    APIError {
        request_id: String,
        http_status: u16,
        code: String,
        message: String,
    },
    #[error(transparent)]
    NetworkError(#[from] reqwest::Error),
    #[error(transparent)]
    OtherErrors(#[from] anyhow::Error),
}