about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYureka <tvl@yuka.dev>2024-07-22T11·14+0200
committeryuka <tvl@yuka.dev>2024-07-22T13·36+0000
commit8342f70c60a2045e4422d77a06baa187d7ff6c28 (patch)
tree98054928afff691e6bd134a5c5cc28c01232afb3
parent5d82e1e62fb4881a2e231a31e358a388883edcc7 (diff)
feat(tvix/composition): improve error message for unknown tag r/8397
Change-Id: I61a31488de17725ae4311f5f5bf8e02edb752cf9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12017
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
-rw-r--r--tvix/castore/src/composition.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/castore/src/composition.rs b/tvix/castore/src/composition.rs
index 3550695a8db3..c76daafc523d 100644
--- a/tvix/castore/src/composition.rs
+++ b/tvix/castore/src/composition.rs
@@ -149,7 +149,7 @@ impl<'r, 'de: 'r, T: 'static> SeedFactory<'de, TagString<'de>> for RegistryWithF
              .0
             .iter()
             .find(|(k, _)| *k == &(TypeId::of::<T>(), tag.as_ref()))
-            .ok_or_else(|| serde::de::Error::custom("Unknown tag"))?
+            .ok_or_else(|| serde::de::Error::custom(format!("Unknown type: {}", tag)))?
             .1;
 
         let entry: &RegistryEntry<T> = <dyn Any>::downcast_ref(&**seed).unwrap();
@@ -215,7 +215,7 @@ impl<'de, T: 'static> serde::Deserialize<'de> for DeserializeWithRegistry<T> {
 
 #[derive(Debug, thiserror::Error)]
 enum TryFromUrlError {
-    #[error("Unknown tag: {0}")]
+    #[error("Unknown type: {0}")]
     UnknownTag(String),
 }