mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-13 03:42:35 -06:00
b7b25713c8
The `object.union_n` builtin could panic from being fed an array with a wrong-typed element because the error value from a type assertion was being ignored. This could only occur under special circumstances, such as when the malformed array came in through a ref, such as `input`. This commit fixes the `object.union_n` builtin by no longer ignoring the type assertion's error value. This allows the builtin to fail gracefully, instead of carrying on blithely and hitting a panic. Fixes #5073 Signed-off-by: Charles Daniels <charles@styra.com>