jmserver/src/error.rs

16 lines
438 B
Rust
Raw Normal View History

2022-01-04 20:06:57 +01:00
use thiserror::Error;
#[derive(Error, Debug)]
pub enum JMError {
#[error("File read error: {0}")]
Read(#[from] std::io::Error),
#[error("Deserialize error: {0}")]
Deserialize(#[from] toml::de::Error),
#[error("Database connection error: {0}")]
Database(#[from] sqlx::Error),
#[error("Axum error: {0}")]
Axum(#[from] hyper::Error),
2022-01-16 22:43:45 +01:00
#[error("Reqwest error: {0}")]
Reqwest(#[from] reqwest::Error),
2022-01-05 23:46:19 +01:00
}