From 9b3041ffe5e873ce914b31b078974cba641fba7b Mon Sep 17 00:00:00 2001 From: kevin zhao Date: Wed, 12 Nov 2025 19:02:19 -0500 Subject: [PATCH] print out actual type in error message --- codex-rs/execpolicy2/src/parser.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/codex-rs/execpolicy2/src/parser.rs b/codex-rs/execpolicy2/src/parser.rs index d18ce06d35..bb1ef5f746 100644 --- a/codex-rs/execpolicy2/src/parser.rs +++ b/codex-rs/execpolicy2/src/parser.rs @@ -93,7 +93,10 @@ fn parse_pattern_token<'v>(value: Value<'v>) -> Result { value .unpack_str() .ok_or_else(|| { - Error::InvalidPattern("pattern alternative must be a string".to_string()) + Error::InvalidPattern(format!( + "pattern alternative must be a string (got {})", + value.get_type() + )) }) .map(str::to_string) })