u_sdk/oss/error.rs
1#[derive(thiserror::Error, Debug)]
2pub enum Error {
3 #[error("error: {0}")]
4 Common(String),
5 #[error("reqwest error: {0}")]
6 Reqwest(#[from] reqwest::Error),
7 #[error("response status is not success: {status}, text: {text}")]
8 RequestAPIFailed { status: String, text: String },
9 #[error("io error: {0}")]
10 IO(#[from] std::io::Error),
11 #[error("error: {0}")]
12 Other(#[from] Box<dyn std::error::Error + Send + Sync>),
13}