doitlater/
error.rs

1/// Represents the various errors which can happen during the operation.
2#[derive(Debug, thiserror::Error)]
3pub enum Error {
4    #[error("Redis error: {0}")]
5    RedisError(#[from] redis::RedisError),
6    #[error("Serialization error: {0}")]
7    SerializationError(#[from] bincode::error::EncodeError),
8    #[error("Deserialization error: {0}")]
9    DeserializationError(#[from] bincode::error::DecodeError),
10    #[error("Job execution error: {error}")]
11    JobExecutionError { job_name: String, error: String },
12    #[error("Cron parsing error: {0}")]
13    CronParsingError(#[from] cron_parser::ParseError),
14}