1#[derive(Debug, thiserror::Error)]
2pub enum SdkError {
3 #[error("Not authenticated or session expired")]
4 NotAuthenticated,
5
6 #[error("Authorization check failed: {0}")]
7 Unauthorized(String),
8
9 #[error("Request failed: {0}")]
10 RequestError(#[from] reqwest::Error),
11
12 #[error("Server error: {0}")]
13 ServerError(String),
14
15 #[error("License signature invalid or malformed: {0}")]
16 Signature(String),
17
18 #[error("License expired")]
19 LicenseExpired,
20
21 #[error("License field mismatch: {0}")]
22 LicenseFieldMismatch(String),
23}
24
25pub type SdkResult<T> = Result<T, SdkError>;