aboutsummaryrefslogtreecommitdiffstats
path: root/lib/shared-svc/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/shared-svc/src/lib.rs')
-rw-r--r--lib/shared-svc/src/lib.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/shared-svc/src/lib.rs b/lib/shared-svc/src/lib.rs
index 92d9c32..d4852a5 100644
--- a/lib/shared-svc/src/lib.rs
+++ b/lib/shared-svc/src/lib.rs
@@ -1,12 +1,19 @@
#[cfg(feature = "cache")]
pub mod cache;
+#[cfg(feature = "database")]
+pub mod database;
+
use thiserror::Error;
#[derive(Error, Debug)]
pub enum ServiceError {
- #[error("data store disconnected")]
+ #[error("cache error")]
+ #[cfg(feature = "cache")]
Cache(#[from] redis::RedisError),
+ #[error("database error")]
+ #[cfg(feature = "database")]
+ Database(#[from] sqlx::Error),
#[error("the data for key `{0}` is not available")]
Redaction(String),
#[error("invalid header (expected {expected:?}, found {found:?})")]