archive_it_client/
error.rs1use std::io;
2
3use reqwest::StatusCode;
4
5#[derive(Debug, thiserror::Error)]
6pub enum Error {
7 #[error("authenticated account list was empty")]
8 Empty,
9 #[error("I/O failed: {0}")]
10 Io(#[from] io::Error),
11 #[error("resource not found: {0}")]
12 NotFound(String),
13 #[error("no primary WARC location for {filename}")]
14 PrimaryLocationMissing { filename: String },
15 #[error("HTTP request failed: {0}")]
16 Request(#[from] reqwest::Error),
17 #[error("unexpected status: {0}")]
18 Status(StatusCode),
19 #[error("invalid URL: {0}")]
20 Url(#[from] url::ParseError),
21}