Skip to main content

koprs_external/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum ExternalError {
5    #[error("HTTP error: {0}")]
6    Http(#[from] reqwest::Error),
7
8    #[error("I/O error: {0}")]
9    Io(#[from] std::io::Error),
10
11    #[error("Internal error: {0}")]
12    Internal(String),
13}
14
15pub type Result<T> = std::result::Result<T, ExternalError>;