diff options
author | Florian Klink <flokli@flokli.de> | 2024-04-30T15·48+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-04-30T17·12+0000 |
commit | c9d3946cb583631bc2ca4a1343f054f7ee64a626 (patch) | |
tree | 358102f0d0f938ea01ba905d7672c609995aadfe /tvix/glue/src/builtins/errors.rs | |
parent | 77546d734efe704f52a4c89b5159cb2d98d5a8aa (diff) |
refactor(tvix/castore/import): restructure error types r/8048
Have ingest_entries return an Error type with only three kinds: - Error while uploading a specific Directory - Error while finalizing the directory upload - Error from the producer Move all ingestion method-specific errors to the individual implementations. Change-Id: I2a015cb7ebc96d084cbe2b809f40d1b53a15daf3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11557 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
Diffstat (limited to 'tvix/glue/src/builtins/errors.rs')
-rw-r--r-- | tvix/glue/src/builtins/errors.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tvix/glue/src/builtins/errors.rs b/tvix/glue/src/builtins/errors.rs index c05d366f135b..f6d5745c56e2 100644 --- a/tvix/glue/src/builtins/errors.rs +++ b/tvix/glue/src/builtins/errors.rs @@ -6,6 +6,7 @@ use nix_compat::{ use reqwest::Url; use std::rc::Rc; use thiserror::Error; +use tvix_castore::import; /// Errors related to derivation construction #[derive(Debug, Error)] @@ -52,10 +53,7 @@ pub enum FetcherError { Io(#[from] std::io::Error), #[error(transparent)] - Import(#[from] tvix_castore::import::Error), - - #[error(transparent)] - ImportArchive(#[from] tvix_castore::import::archive::Error), + Import(#[from] tvix_castore::import::IngestionError<import::archive::Error>), #[error("Error calculating store path for fetcher output: {0}")] StorePath(#[from] BuildStorePathError), |