alert-me/app/src/error.rs

20 lines
546 B
Rust

use sea_orm::DbErr;
use thiserror::Error;
#[derive(Error, Debug)]
#[error("opds error")]
pub enum Error {
/// Database Error
#[error("opds error")]
DbError(#[from] DbErr),
/// Error fetching data from alertswiss
#[error("data error")]
FetchError(#[from] reqwest::Error),
/// Error publishing to MQTT
#[error("mqtt client error")]
MqttCLientError(#[from] rumqttc::ClientError),
/// Error publishing to MQTT
#[error("mqtt connection error")]
MqttConnectionError(#[from] rumqttc::ConnectionError),
}