List filter expression throws error if list is null
Opened this issue · 1 comments
jonathanlukas commented
Describe the bug
If I try to filter a list that does not exist (is null), the expression will throw an error like:
failed to evaluate expression 'partner[item.nummer = "1"]': Expected list but found 'null'
Also, there are warnings that represent the same:
* [NO_VARIABLE_FOUND] No variable found with name 'partner'
* [INVALID_TYPE] Expected list but found 'null'
To Reproduce
- Use https://camunda.github.io/feel-scala/docs/playground/
- Set expression to:
partner[item.nummer = "1"]
- Hit evaluate
Expected behavior
The result should be null, the warnings are fine
Environment
- FEEL engine version: 1.17
- Affects:
- Camunda Connector Runtime 8.4.3
saig0 commented
@jonathanlukas thank you for reporting. 👍 I agree that the expression should return null
instead.