https_dns/
error.rs

1use thiserror::Error;
2
3#[derive(Error, Debug)]
4pub enum LocalError {
5    #[error("failed to parse the address {0}:{1}")]
6    InvalidAddress(String, u16),
7
8    #[error("failed to bind to the address {0}:{1} (Permission denied)")]
9    PermissionDenied(String, u16),
10
11    #[error("failed to bind to the address {0}:{1}")]
12    Unknown(String, u16),
13}
14
15#[derive(Error, Debug)]
16pub enum UpstreamError {
17    #[error("failed to build the HTTPS client")]
18    Build,
19
20    #[error("failed to bootstrap the address {0}: {1}")]
21    Bootstrap(String, String),
22
23    #[error("failed to resolve the DNS request")]
24    Resolve,
25}