crate_seq_registry/error.rs
1//! Error type for registry operations.
2
3/// Errors produced by the registry client.
4#[derive(Debug, thiserror::Error)]
5pub enum Error {
6 /// HTTP transport or status error.
7 #[error("HTTP request failed: {0}")]
8 Http(#[from] reqwest::Error),
9
10 /// Response body is not valid JSON.
11 #[error("JSON parse failed: {0}")]
12 Json(#[from] serde_json::Error),
13
14 /// Subprocess spawn or wait error.
15 #[error("subprocess error: {0}")]
16 Subprocess(std::io::Error),
17
18 /// Registry index did not reflect the published version within the retry window.
19 #[error("index timeout: {crate_name} v{version} not visible after max retries")]
20 IndexTimeout {
21 /// The crate that was not indexed in time.
22 crate_name: String,
23 /// The version that was not found.
24 version: semver::Version,
25 },
26}