diff --git a/crown/src/nockapp/mod.rs b/crown/src/nockapp/mod.rs index 05c2204..87b0a62 100644 --- a/crown/src/nockapp/mod.rs +++ b/crown/src/nockapp/mod.rs @@ -272,6 +272,9 @@ pub struct NockAppHandle { impl NockAppHandle { pub async fn poke(&self, poke: NounSlab) -> Result { + if let Err(e) = poke.validate_root() { + panic!("Invalid poke noun: {}", e); + } let (ack_channel, ack_future) = oneshot::channel(); self.io_sender .send(IOAction::Poke { poke, ack_channel }) @@ -280,6 +283,9 @@ impl NockAppHandle { } pub async fn peek(&self, path: NounSlab) -> Result, NockAppError> { + if let Err(e) = path.validate_root() { + panic!("Invalid peek path: {}", e); + } let (result_channel, result_future) = oneshot::channel(); self.io_sender .send(IOAction::Peek {