Re-organized providers and added a few
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
/// Error type for data fetching operations.
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum DataError {
|
||||
#[error("HTTP error: {0}")]
|
||||
Http(#[from] reqwest::Error),
|
||||
|
||||
#[error("JSON error: {0}")]
|
||||
Json(#[from] serde_json::Error),
|
||||
|
||||
#[error("{0}")]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
pub type DataResult<T> = Result<T, DataError>;
|
||||
Reference in New Issue
Block a user