diff --git a/codex-rs/execpolicy2/src/parser.rs b/codex-rs/execpolicy2/src/parser.rs index bb1ef5f746..b82109f77b 100644 --- a/codex-rs/execpolicy2/src/parser.rs +++ b/codex-rs/execpolicy2/src/parser.rs @@ -154,7 +154,12 @@ fn parse_list_example(list: &ListRef) -> Result> { .map(|value| { value .unpack_str() - .ok_or_else(|| Error::InvalidExample("example tokens must be strings".to_string())) + .ok_or_else(|| { + Error::InvalidExample(format!( + "example tokens must be strings (got {})", + value.get_type() + )) + }) .map(str::to_string) }) .collect::>()?;