Calculate does not generate any error when used in the Filter action

When I try to evaluate an invalid number with the Calculate action, this KM action triggers an error, which is great:

But when I try to assign the same invalid string to the same KM variable using this action, given that "E3" is already in the variable H1, there is no error:

Doesn't it seem inconsistent that the Calculate Action triggers an error for the same data, but the Calculate filter does not? To make matters worse, the Calculate Action does NOT change the value if the calculate string is not a number, while the Calculate filter does change the value to an empty string. So to make their behaviour consistent I would need to detect the error and clear the value.

I suppose it would be possible to write different error handling code for each action, one based on the error trigger and the other based on the empty string result, but that feels somewhat contrived.

So I guess I'm making a suggestion that these should be made consistent, and I think most people would prefer that the second one generate an error.

Probably. Unfortunately, Filter, like tokens, cannot generate errors.

Okay. I explained the workaround above. To detect an error in a Calculate action you can use the built-in error mechanism. To detect an error for a calculation in the calculate filter you can check if the returned value is an empty string.