Invalid formula reported as Invalid Subtype
Closed this issue · 1 comments
pkozuchowski commented
When formula in Entry Criteria is invalid and doesn't compile, this is not reported as invalid formula but as INVALID_SUBTYPE.
FormulaFilter:159
mitchspano commented
Good catch! Thanks for bringing this to my attention @pkozuchowski.
It turns out that Formula.builder().build() throws System.FormulaValidationException in multiple scenarios:
- The defining class for the input type is not global
- The formula is syntactically invalid
Ideally, we would delineate between these two cases with their own messages, but that's not possible.
I will need to update the FormulaFilter class getFormulaInstance method to ensure that is throws a robust enough error message which encompasses both scenarios.