-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
kind/bugSomething isn't workingSomething isn't workingsquad/dataIssues that belongs to the named squad.Issues that belongs to the named squad.
Description
Description of the bug
When trying to use the new feature ShouldRunAfterRemovingHiddenData in validators, the backend crashes if the expression evaluation fails. In the layout, you get an error message, but the component still renders with a default value for the expression. It might make sense to have similar behavior in the backend instead of throwing an unhandled exception.
Expected Behavior
Backend should handle expression evaluation errors gracefully and return a default value
Actual Behavior
The backend crashes with the following exception:
An unhandled exception has occurred while executing the request.
Altinn.App.Core.Internal.Expressions.ExpressionEvaluatorTypeErrorException: Expected number, got value "asd"
Steps To Reproduce
- Enable ShouldRunAfterRemovingHiddenData in a validator.
- Use an expression to hide a component:
["hidden": [ "lessThan", [ "component", "S11-PedagogiskVirksomhet-TotalDeltagelse-Input" ], 1 ], - Provide invalid input (e.g., a string instead of a number).
Additional Information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't workingsquad/dataIssues that belongs to the named squad.Issues that belongs to the named squad.
Type
Projects
Status
👷 In progress