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