From 989f0730616727d7cfd3bd7a2ebdab0d2221eed0 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Fri, 2 Aug 2024 09:21:56 +0200 Subject: [PATCH] feat: add inner error Signed-off-by: kjuulh --- crates/drift/src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/drift/src/lib.rs b/crates/drift/src/lib.rs index 1d392b7..7362177 100644 --- a/crates/drift/src/lib.rs +++ b/crates/drift/src/lib.rs @@ -5,8 +5,11 @@ use std::future::Future; use tokio::time; use tokio_util::sync::CancellationToken; -#[derive(Debug, Clone, thiserror::Error)] -pub enum DriftError {} +#[derive(Debug, thiserror::Error)] +pub enum DriftError { + #[error("job failed with inner error")] + JobError(#[from] anyhow::Error), +} pub fn schedule(interval: Duration, func: F) -> CancellationToken where