mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
updated error messaging to indicate type
This commit is contained in:
@@ -123,9 +123,10 @@ fn parse_pattern_token<'v>(value: Value<'v>) -> Result<PatternToken> {
|
||||
_ => Ok(PatternToken::Alts(tokens)),
|
||||
}
|
||||
} else {
|
||||
Err(Error::InvalidPattern(
|
||||
"pattern element must be a string or list of strings".to_string(),
|
||||
))
|
||||
Err(Error::InvalidPattern(format!(
|
||||
"pattern element must be a string or list of strings (got {})",
|
||||
value.get_type()
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user