Skip to main content
All CollectionsCommon Errors
Error running calculation
Error running calculation

Error running calculation explained.

Praise Magidi avatar
Written by Praise Magidi
Updated over a week ago

Step

Condition step branch.

Message

Invalid condition result. Must be Boolean.

Cause

The code inside of the condition step branch does not resolve to a Boolean type (```true``` or ```false```)

Resolution

Evaluate the code in your Condition branch to isolate where it is possibly resolving to a different type. Remember that JavaScript has the concept of "truthy" and "falsey" values, allowing other types to be coerced into a Boolean representation easily, however, this can sometimes be confusing if you are not careful about how your condition is written. If you have values in your condition that are different data types, and you want to check that they are truthy (or defined), consider using the ```!!``` syntax to coerce the value to a Boolean. Similarly, if you want to check for falsey values, consider the ```!``` syntax. See the MDN documentation on Boolean coercion for more information on how Boolean coercion works in JavaScript.

Error Detail

json
{
"message": "Error running calculation",
"statusCode": 400,
"errorMessage": "Invalid condition result. Must be Boolean",
"error": {},
}
Did this answer your question?