aboutsummaryrefslogtreecommitdiffstats
path: root/crates/users/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/users/src/error.rs')
-rw-r--r--crates/users/src/error.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/users/src/error.rs b/crates/users/src/error.rs
new file mode 100644
index 0000000..1ff28ee
--- /dev/null
+++ b/crates/users/src/error.rs
@@ -0,0 +1,13 @@
+use thiserror::Error;
+
+#[derive(Error, Debug)]
+pub enum UserError {
+ #[error("data store disconnected")]
+ Disconnect(#[from] std::io::Error),
+ #[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,
+}