about summary refs log tree commit diff
path: root/tvix/derivation/src/errors.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-01-17T12·31+0100
committerflokli <flokli@flokli.de>2023-01-18T17·13+0000
commit9822fa387ae8d8053eaba1b30c3fc5870ba701b8 (patch)
tree43d93feadbeeabce7f3377076bd69e4db7765f0b /tvix/derivation/src/errors.rs
parent083e24bbb1a216b43bfa4fa2e509a1ee6a88ad46 (diff)
feat(tvix/derivation): more checks for output hashes and encoding r/5701
Change-Id: Idebad60c3bf9daf94d04a36bb73ac0dd767f9e79
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7856
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/derivation/src/errors.rs')
-rw-r--r--tvix/derivation/src/errors.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/derivation/src/errors.rs b/tvix/derivation/src/errors.rs
index 75b101efddae..6942967e1d23 100644
--- a/tvix/derivation/src/errors.rs
+++ b/tvix/derivation/src/errors.rs
@@ -47,4 +47,10 @@ pub enum DerivationError {
 pub enum OutputError {
     #[error("Invalid ouput path {0}: {1}")]
     InvalidOutputPath(String, ParseStorePathError),
+    #[error("Invalid hash encoding: {0}")]
+    InvalidHashEncoding(String, data_encoding::DecodeError),
+    #[error("Invalid hash algo: {0}")]
+    InvalidHashAlgo(String),
+    #[error("Invalid Digest size {0} for algo {1}")]
+    InvalidDigestSizeForAlgo(usize, String),
 }