mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
print out actual type in error message
This commit is contained in:
@@ -93,7 +93,10 @@ fn parse_pattern_token<'v>(value: Value<'v>) -> Result<PatternToken> {
|
||||
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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user