about summary refs log tree commit diff
path: root/tvix/store/src/proto
diff options
context:
space:
mode:
authorAspen Smith <root@gws.fyi>2024-02-19T21·31-0500
committerclbot <clbot@tvl.fyi>2024-02-20T03·48+0000
commit0631b870b0a573bf603b0049c90366ccddb6e728 (patch)
tree2fbe72646ea776d851627216a658ef13201cf1b6 /tvix/store/src/proto
parent0f335950967b410110150180716bd203d1f6fd1b (diff)
fix(tvix/store): Improve error message for InvalidNodeName r/7564
Rather than debug-formatting a Vec<u8>, 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 <root@gws.fyi>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/store/src/proto')
-rw-r--r--tvix/store/src/proto/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/store/src/proto/mod.rs b/tvix/store/src/proto/mod.rs
index 665da8c6c58f..9c8e44cfb53a 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<u8>, store_path::Error),
 
     /// The digest in narinfo.nar_sha256 has an invalid len.