diff options
Diffstat (limited to 'lib/shared-svc/src/lib.rs')
| -rw-r--r-- | lib/shared-svc/src/lib.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/shared-svc/src/lib.rs b/lib/shared-svc/src/lib.rs new file mode 100644 index 0000000..92d9c32 --- /dev/null +++ b/lib/shared-svc/src/lib.rs @@ -0,0 +1,16 @@ +#[cfg(feature = "cache")] +pub mod cache; + +use thiserror::Error; + +#[derive(Error, Debug)] +pub enum ServiceError { + #[error("data store disconnected")] + Cache(#[from] redis::RedisError), + #[error("the data for key `{0}` is not available")] + Redaction(String), + #[error("invalid header (expected {expected:?}, found {found:?})")] + InvalidHeader { expected: String, found: String }, + #[error("unknown data store error")] + Unknown, +} |
