chore(middleware): additional error reporting for custom predicates (#330)

* Additional error reporting for custom predicates

* Code review

* Typo
This commit is contained in:
Ahmad Afuni 2025-07-14 23:27:33 +10:00 committed by GitHub
parent aeedf55bad
commit e8468d7fa8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 133 additions and 44 deletions

View file

@ -471,11 +471,14 @@ impl MainPodBuilder {
for (st_tmpl, st) in pred.statements.iter().zip(args.iter()) {
let st_args = st.args();
for (st_tmpl_arg, st_arg) in st_tmpl.args.iter().zip(&st_args) {
if !check_st_tmpl(st_tmpl_arg, st_arg, &mut wildcard_map) {
if let Err(st_tmpl_check_error) =
check_st_tmpl(st_tmpl_arg, st_arg, &mut wildcard_map)
{
return Err(Error::statements_dont_match(
st.clone(),
st_tmpl.clone(),
wildcard_map,
st_tmpl_check_error,
));
}
}