use thiserror::Error;
#[derive(Debug, Error)]
pub enum PubChemError {
#[error("No compound found in PubChem for: '{input}'")]
NotFound { input: String },
#[error("SubstanceIdentifier has no usable field for PubChem lookup (provide CAS, SMILES, InChIKey, InChI, or IUPAC name)")]
NoUsableIdentifier,
#[error("PubChem HTTP error: {0}")]
Http(String),
#[error("Failed to parse PubChem response: {0}")]
Parse(String),
#[error("PubChem rate limit exceeded — retry after a few seconds")]
RateLimitExceeded,
}