From 786854713c3d5d80cd8ededc857151ac65b54dbd Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 12 Feb 2023 11:39:31 +0100 Subject: feat(tvix/store): add errors Change-Id: I7be0a4eaa29840e1a3329bccb791975de22828ef Reviewed-on: https://cl.tvl.fyi/c/depot/+/8085 Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/store/src/errors.rs | 11 +++++++++++ tvix/store/src/lib.rs | 4 ++++ 2 files changed, 15 insertions(+) create mode 100644 tvix/store/src/errors.rs (limited to 'tvix/store') diff --git a/tvix/store/src/errors.rs b/tvix/store/src/errors.rs new file mode 100644 index 000000000000..003c619b7213 --- /dev/null +++ b/tvix/store/src/errors.rs @@ -0,0 +1,11 @@ +use thiserror::Error; + +/// Errors related to communication with the store. +#[derive(Debug, Error)] +pub enum Error { + #[error("invalid request: {0}")] + InvalidRequest(String), + + #[error("internal storage error: {0}")] + StorageError(String), +} diff --git a/tvix/store/src/lib.rs b/tvix/store/src/lib.rs index a9e2382eaa1e..2c8e8610daf6 100644 --- a/tvix/store/src/lib.rs +++ b/tvix/store/src/lib.rs @@ -1,9 +1,13 @@ pub mod client; + +mod errors; + pub mod proto; pub mod dummy_blob_service; pub mod sled_directory_service; pub mod sled_path_info_service; +pub use errors::Error; mod nar; -- cgit 1.4.1