From 0631b870b0a573bf603b0049c90366ccddb6e728 Mon Sep 17 00:00:00 2001 From: Aspen Smith Date: Mon, 19 Feb 2024 16:31:07 -0500 Subject: fix(tvix/store): Improve error message for InvalidNodeName Rather than debug-formatting a Vec, which gives just a sequence of numbers (not very helpful!) use String::from_utf8_lossy to give a much more human-readable error message Change-Id: I6cae795ebe2ab9a656c087b82a143411e6c7c81a Reviewed-on: https://cl.tvl.fyi/c/depot/+/10980 Autosubmit: aspen Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/store/src/proto/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tvix/store/src/proto/mod.rs b/tvix/store/src/proto/mod.rs index 665da8c6c5..9c8e44cfb5 100644 --- a/tvix/store/src/proto/mod.rs +++ b/tvix/store/src/proto/mod.rs @@ -41,7 +41,7 @@ pub enum ValidatePathInfoError { InvalidRootNode(ValidateNodeError), /// Invalid node name encountered. Root nodes in PathInfos have more strict name requirements - #[error("Failed to parse {0:?} as StorePath: {1}")] + #[error("Failed to parse {} as StorePath: {1}", String::from_utf8_lossy(.0))] InvalidNodeName(Vec, store_path::Error), /// The digest in narinfo.nar_sha256 has an invalid len. -- cgit 1.4.1