irontide_tracker/
error.rs1pub type Result<T> = std::result::Result<T, Error>;
3
4#[derive(Debug, thiserror::Error)]
6pub enum Error {
7 #[error("tracker returned error: {message}")]
9 TrackerError {
10 message: String,
12 retry_in: Option<u32>,
14 },
15
16 #[error("invalid tracker response: {0}")]
18 InvalidResponse(String),
19
20 #[error("UDP protocol error: {0}")]
22 UdpProtocol(String),
23
24 #[error("connection timed out")]
26 Timeout,
27
28 #[error("bencode: {0}")]
30 Bencode(#[from] irontide_bencode::Error),
31
32 #[error("HTTP: {0}")]
34 Http(#[from] reqwest::Error),
35
36 #[error("I/O: {0}")]
38 Io(#[from] std::io::Error),
39
40 #[error("invalid URL: {0}")]
42 InvalidUrl(String),
43
44 #[error("URL security policy violation: {0}")]
46 SecurityViolation(String),
47}