#[derive(Debug, thiserror::Error)]
pub enum ZoteroError {
#[error("HTTP error: {0}")]
Http(#[from] reqwest::Error),
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
#[error("API error (status {status}): {message}")]
Api { status: u16, message: String },
#[error(
"Zotero is installed but not running (found at {path}).\n\
Start Zotero and try again, or set ZOTERO_CHECK_LAUNCHED=0 to use the remote API instead."
)]
NotRunning { path: String },
}
pub type Result<T> = std::result::Result<T, ZoteroError>;