use thiserror::Error;
#[derive(Error, Debug)]
pub enum SdkError {
#[error("HTTP error: {0}")]
Http(#[from] reqwest::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("URL parse error: {0}")]
Url(#[from] url::ParseError),
#[error("NLECloud API error (status: {status}): {message}")]
Api {
status: i32,
message: String,
},
#[error("Authentication error: {0}")]
Authentication(String),
#[error("Invalid parameter: {0}")]
InvalidParameter(String),
#[error("Unexpected response error: {0}")]
UnexpectedResponse(String),
}
pub type Result<T> = std::result::Result<T, SdkError>;