aboutsummaryrefslogtreecommitdiffstats
path: root/lib/auth-service/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/auth-service/src/lib.rs')
-rw-r--r--lib/auth-service/src/lib.rs23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/auth-service/src/lib.rs b/lib/auth-service/src/lib.rs
index b93cf3f..f7b9e80 100644
--- a/lib/auth-service/src/lib.rs
+++ b/lib/auth-service/src/lib.rs
@@ -1,14 +1,15 @@
-pub fn add(left: u64, right: u64) -> u64 {
- left + right
-}
+pub mod client;
-#[cfg(test)]
-mod tests {
- use super::*;
+use thiserror::Error;
- #[test]
- fn it_works() {
- let result = add(2, 2);
- assert_eq!(result, 4);
- }
+#[derive(Error, Debug)]
+pub enum AuthServiceError {
+ #[error("invalid url provided")]
+ InvalidUrl(#[from] url::ParseError),
+ #[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,
}