Some checks failed
Run Check Script / check (pull_request) Failing after 17s
38 lines
892 B
Rust
38 lines
892 B
Rust
use std::path::PathBuf;
|
|
use thiserror::Error;
|
|
|
|
#[derive(Debug, Error)]
|
|
pub enum AssetError {
|
|
#[error("File not found: {0}")]
|
|
FileNotFound(PathBuf),
|
|
|
|
#[error("Checksum mismatch for '{path}': expected {expected}, got {actual}")]
|
|
ChecksumMismatch {
|
|
path: PathBuf,
|
|
expected: String,
|
|
actual: String,
|
|
},
|
|
|
|
#[error("Checksum algorithm not available: {0}. Enable the corresponding feature flag.")]
|
|
ChecksumAlgoNotAvailable(String),
|
|
|
|
#[error("Download failed: {0}")]
|
|
DownloadFailed(String),
|
|
|
|
#[error("S3 error: {0}")]
|
|
S3Error(String),
|
|
|
|
#[error("IO error: {0}")]
|
|
IoError(#[from] std::io::Error),
|
|
|
|
#[cfg(feature = "reqwest")]
|
|
#[error("HTTP error: {0}")]
|
|
HttpError(#[from] reqwest::Error),
|
|
|
|
#[error("Store error: {0}")]
|
|
StoreError(String),
|
|
|
|
#[error("Configuration error: {0}")]
|
|
ConfigError(String),
|
|
}
|