diff options
Diffstat (limited to 'tvix/glue/src/builtins/errors.rs')
-rw-r--r-- | tvix/glue/src/builtins/errors.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tvix/glue/src/builtins/errors.rs b/tvix/glue/src/builtins/errors.rs index 5aced2bde43b..5e36bc1a243f 100644 --- a/tvix/glue/src/builtins/errors.rs +++ b/tvix/glue/src/builtins/errors.rs @@ -3,6 +3,7 @@ use nix_compat::{ nixhash::{self, NixHash}, store_path::BuildStorePathError, }; +use reqwest::Url; use std::rc::Rc; use thiserror::Error; @@ -33,7 +34,7 @@ impl From<DerivationError> for tvix_eval::ErrorKind { pub enum FetcherError { #[error("hash mismatch in file downloaded from {url}:\n wanted: {wanted}\n got: {got}")] HashMismatch { - url: String, + url: Url, wanted: NixHash, got: NixHash, }, @@ -41,6 +42,9 @@ pub enum FetcherError { #[error("Invalid hash type '{0}' for fetcher")] InvalidHashType(&'static str), + #[error("Unable to parse URL: {0}")] + InvalidUrl(#[from] url::ParseError), + #[error(transparent)] Http(#[from] reqwest::Error), |