use thiserror::Error;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum ParseError {
#[error("unknown {kind}: {value}")]
UnknownValue {
kind: &'static str,
value: String,
},
#[error("invalid slurper CSV at line {line}: {reason}")]
InvalidSlurperCsv {
line: usize,
reason: String,
},
}
#[cfg(feature = "client")]
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum ClientError {
#[error("HTTP error: {0}")]
Http(#[from] reqwest::Error),
#[error("failed to parse response: {0}")]
Parse(#[from] ParseError),
#[error("status endpoint returned no usable data URLs")]
NoDataUrls,
}