fix: Propagate errors encountered in argument evaluation (#308)

fixes #301

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2024-08-31 13:46:55 -07:00
committed by GitHub
parent af5071446b
commit a4a80d7fc6
2 changed files with 18 additions and 11 deletions

View File

@@ -59,3 +59,20 @@ cases:
a1 = inc(5)
query: data.test
want_result: {}
- note: call parameter raises error
data: {}
modules:
- |
package test
import rego.v1
bar := 1 if {
1 + "hello"
}
foo := 1 if {
count(bar)
}
query: data.test
error: expects numeric argument.