diff --git a/tvix/glue/src/builtins/import.rs b/tvix/glue/src/builtins/import.rs index 5f495dcc6..83b91165c 100644 --- a/tvix/glue/src/builtins/import.rs +++ b/tvix/glue/src/builtins/import.rs @@ -353,16 +353,7 @@ mod import_builtins { match nix_compat::nixhash::from_str(expected.to_str()?, Some("sha256")) { Ok(NixHash::Sha256(digest)) => Ok(digest), Ok(_) => unreachable!(), - Err(_e) => { - // TODO: a better error would be nice, we use - // DerivationError::InvalidOutputHash usually for derivation construction. - // This is not a derivation construction, should we move it outside and - // generalize? - Err(ErrorKind::TypeError { - expected: "sha256", - actual: "not a sha256", - }) - } + Err(e) => Err(ErrorKind::InvalidHash(e.to_string())), } }) })