1use thiserror::Error;
2
3pub type Result<T> = std::result::Result<T, Error>;
4
5#[derive(Debug, Error)]
6pub enum Error {
7 #[error(transparent)]
8 Io(#[from] std::io::Error),
9
10 #[error(transparent)]
11 RegistryDb(#[from] synd_registry::RegistryDbError),
12
13 #[error(transparent)]
14 Reqwest(#[from] reqwest::Error),
15
16 #[error(transparent)]
17 InvalidHeader(#[from] reqwest::header::InvalidHeaderValue),
18
19 #[error(transparent)]
20 Github(#[from] crate::client::github::GithubClientError),
21
22 #[error("tls config is invalid: {source}")]
23 TlsConfig {
24 #[source]
25 source: std::io::Error,
26 },
27
28 #[error("local token must not be empty")]
29 EmptyLocalToken,
30}