Initial project setup
- Tauri 2.0 + Svelte + TypeScript scaffolding - Qobuz API client implementation (Rust) - Bundle token extraction - User authentication - Request signing (MD5 signatures) - Search/browse endpoints - Stream URL retrieval with quality fallback - Tauri commands for frontend IPC - Module stubs for player, queue, config
This commit is contained in:
commit
8a094ef467
49 files changed
+1733
No files matched your search
@@ -0,0 +1,44 @@
|
||||
//! API error types
|
||||
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Error, Debug)]
|
||||
pub enum ApiError {
|
||||
#[error("Authentication failed: {0}")]
|
||||
AuthenticationError(String),
|
||||
|
||||
#[error("Invalid app ID")]
|
||||
InvalidAppId,
|
||||
|
||||
#[error("Invalid app secret")]
|
||||
InvalidAppSecret,
|
||||
|
||||
#[error("Failed to extract bundle tokens: {0}")]
|
||||
BundleExtractionError(String),
|
||||
|
||||
#[error("User is not eligible (no active subscription)")]
|
||||
IneligibleUser,
|
||||
|
||||
#[error("Track is not streamable")]
|
||||
NonStreamable,
|
||||
|
||||
#[error("Invalid quality format: {0}")]
|
||||
InvalidQuality(u32),
|
||||
|
||||
#[error("No valid quality available for this track")]
|
||||
NoQualityAvailable,
|
||||
|
||||
#[error("Network error: {0}")]
|
||||
NetworkError(#[from] reqwest::Error),
|
||||
|
||||
#[error("JSON parsing error: {0}")]
|
||||
ParseError(#[from] serde_json::Error),
|
||||
|
||||
#[error("API error: {0}")]
|
||||
ApiResponse(String),
|
||||
|
||||
#[error("Rate limited, retry after {0} seconds")]
|
||||
RateLimited(u64),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, ApiError>;
|
||||
Reference in new issue
Block a user