about summary refs log tree commit diff
path: root/tvix/store
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store')
-rw-r--r--tvix/store/src/errors.rs11
-rw-r--r--tvix/store/src/lib.rs4
2 files changed, 15 insertions, 0 deletions
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;