mirror of
https://github.com/kristoferssolo/tg-relay-rs.git
synced 2026-02-25 05:08:15 +00:00
refactor(instagram): organize files
This commit is contained in:
27
src/error.rs
Normal file
27
src/error.rs
Normal file
@@ -0,0 +1,27 @@
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
#[error("io error: {0}")]
|
||||
Io(#[from] std::io::Error),
|
||||
|
||||
#[error("instaloader failed: {0}")]
|
||||
InstaloaderFaileled(String),
|
||||
|
||||
#[error("no media found")]
|
||||
NoMediaFound,
|
||||
|
||||
#[error("unknown media kind")]
|
||||
UnknownMediaKind,
|
||||
|
||||
#[error("teloxide error: {0}")]
|
||||
Teloxide(#[from] teloxide::RequestError),
|
||||
|
||||
#[error("join error: {0}")]
|
||||
Join(#[from] tokio::task::JoinError),
|
||||
|
||||
#[error("other: {0}")]
|
||||
Other(String),
|
||||
}
|
||||
|
||||
pub type Result<T> = std::result::Result<T, Error>;
|
||||
Reference in New Issue
Block a user