hs_predict/pubchem/
error.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
5pub enum PubChemError {
6 #[error("No compound found in PubChem for: '{input}'")]
8 NotFound { input: String },
9
10 #[error("SubstanceIdentifier has no usable field for PubChem lookup (provide CAS, SMILES, InChIKey, InChI, or IUPAC name)")]
15 NoUsableIdentifier,
16
17 #[error("PubChem HTTP error: {0}")]
19 Http(String),
20
21 #[error("Failed to parse PubChem response: {0}")]
23 Parse(String),
24
25 #[error("PubChem rate limit exceeded — retry after a few seconds")]
27 RateLimitExceeded,
28}