zenlayercloud_sdk/errors.rs
1
2#[derive(Debug, thiserror::Error)]
3pub enum Error {
4 #[error("requestId:{request_id:?}, http_status:{http_status:?}, code:{code:?}, message:{message:?}")]
5 APIError {
6 request_id: String,
7 http_status: u16,
8 code: String,
9 message: String,
10 },
11 #[error(transparent)]
12 NetworkError(#[from] reqwest::Error),
13 #[error(transparent)]
14 OtherErrors(#[from] anyhow::Error),
15}