diff --git a/src/error/sidekiq.rs b/src/error/sidekiq.rs index 1555cb9..4b14f3e 100644 --- a/src/error/sidekiq.rs +++ b/src/error/sidekiq.rs @@ -33,3 +33,21 @@ impl From> for Error { Self::Sidekiq(SidekiqError::from(value)) } } + +impl From for sidekiq::Error { + fn from(value: Error) -> Self { + match value { + Error::Sidekiq(err) => err.into(), + _ => sidekiq::Error::Any(Box::new(value)), + } + } +} + +impl From for sidekiq::Error { + fn from(value: SidekiqError) -> Self { + match value { + SidekiqError::Sidekiq(err) => err, + _ => sidekiq::Error::Any(Box::new(value)), + } + } +}