Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve policy compiler error message for incompatible outputs. (#1082)
The previous message was confusing to users in the situation where the output of the current block was correct, but the previous blocks had incorrect types. It made them believe that the incorrect type was the "expected" output type for the rule, and that the problem was at the error line/column. For example, the rule: ``` rule: match: - condition: foo output: "'incorrect'" - condition: bar output: "false" - output: "true" ``` would point at the "bar" block as having the wrong type, even though the wrong type is in the "foo" block. The new message makes it clear that the error arises from the type of the block being incompatible with the *previous* block types -- not with the expected output of the rule.
- Loading branch information