Skip to content

Commit caf6103

Browse files
authored
feat: emit an error if the condition return type is not a boolean (#18196)
* feat: emit an error if the condition return type is not a boolean * panic instead of just emit
1 parent 0aeb143 commit caf6103

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/conditions/vrl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl Conditional for Vrl {
113113
let result = result
114114
.map(|value| match value {
115115
Value::Boolean(boolean) => boolean,
116-
_ => false,
116+
_ => panic!("VRL condition did not return a boolean type"),
117117
})
118118
.unwrap_or_else(|err| {
119119
emit!(VrlConditionExecutionError {

0 commit comments

Comments
 (0)