cadmus_core/dictionary/monolingual/
errors.rs1use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum MonolingualError {
7 #[error("HTTP request failed: {0}")]
8 Http(#[from] crate::http::HttpError),
9
10 #[error("Failed to deserialize API response: {0}")]
11 Deserialization(#[from] serde_json::Error),
12
13 #[error("Database error: {0}")]
14 Database(#[from] anyhow::Error),
15
16 #[error("I/O error: {0}")]
17 Io(#[from] std::io::Error),
18
19 #[error("Dictionary not found for language: {0}")]
20 NotFound(String),
21
22 #[error("Request failed: {0}")]
23 Request(String),
24
25 #[error("Failed to extract dictionary archive: {0}")]
26 Extraction(String),
27
28 #[error("Installation already in progress for language: {0}")]
29 InstallationInProgress(String),
30}