ERROR CODE

ERROR MESSAGE

DESCRIPTION

EXAMPLE

1501

Expression cannot be blank.

This gets invoked when an expression is left blank. 

Sample Payload:

{ "expr": "", "return_type": "text" }

Response Body:

{ "code": 1501, "message": "Expression cannot be blank.", "operator": "", "operand": "", "link": "", "requestId": "ab2b3ea6-e419-42b2-ba41-07ab3cdcd605" }


1502

Invalid operator '%s'.

--WIP--

--WIP--

1503

Invalid operand '%s'.

This gets invoked when an invalid operand is provided. In the example, we can see dateTime requires 7 operands (6 operands and one timezone) while we are giving values to three operands only and the timezone. So it will give us an Invalid operand error.

Sample Payload:

{ "expr": "dateTime( #{operand1}, #{operand2}, #{operand3}, #{operand4}, #{operand5}, #{operand6}, #{timezone} )", "operand_values": { "operand1": 2019, "operand2": 23, "operand3": 3, "timezone":"Australia/Sydney" }, "return_type": "date" }

Response Body:

{ "code": 1503, "message": "Invalid operand 'operand4'.", "operator": "", "operand": "operand4", "link": "", "requestId": "37a24a53-2249-42fa-9495-bd9f0d347dd3" }


1504

Operator '%s' : An operand is missing.

This gets invoked when the operand is not present in the expression. In the example, we have a year function but we haven't specified a value (operand) to it.

Sample Payload:

{ "expr": "year()", "operand_values": { }, "return_type": "decimal" }

Response Body:

{ "code": 1504, "message": "Operator 'year' : An operand is missing.", "operator": "year", "operand": "", "link": "", "requestId": "64879b19-9b15-49e1-8948-83cb033c2cce" }


1505

Operator '%s' : One of its operands is invalid.

This gets invoked when one of the operands is invalid. Like in the example, we are using the max function to compare between a string and a number which is not possible to achieve.

Sample Payload:

{ "expr": "max(#{operand1},#{operand2})", "operand_values": { "operand1": "abc", "operand2": 10 }, "return_type": "number" }

Response Body:

{ "code": 1505, "message": "Operator 'max' : One of its operands is invalid.", "operator": "max", "operand": "", "link": "", "requestId": "9076afdd-e07c-4c58-ac2c-0bf411a673d1" }


1505Operator '%s' : One of its operands is invalid.
This gets invoked when one of the operands is invalid. Like in the example, we are using the max function to compare between a string and a number which is not possible to achieve.

Sample Payload:

{ "expr": "concat(\"\#{ticket.subject}\",\"\#{ticket.subject}\")", "operand_values": { "ticket.subject": "abc" }, "return_type": "text" }

Response Body:

{"code"=>1505, "message"=>"Operator 'concat' : One of its operands is invalid.", "operator"=>"concat", "operand"=>"", "link"=>"", "requestId"=>"fc202da9-3444-4efc-97fd-a92cc0684d79"}

1507

Missing '%s'.

This happens when the expression misses an open parenthesis. Just like in the example.

Sample Payload:

{ "expr":"equals’test’,‘test’)", "return_type": "boolean" }

Response Body:

{ "code": 1507, "message": "Missing '('.", "operator": "", "operand": "", "link": "", "requestId": "fe223cca-6a23-431c-8737-b8c2028ebc3d" }


1508

Operand '%s' : Missing '%s'.

This happens when a closing delimiter is missed. Like in the example, "}" is missing from the second operand.

Sample Payload:

{ "expr": "charAt( #{operand1}, #{operand2)", "operand_values": { "operand1": 100, "operand2": 34 }, "return_type": "number" }

Response Body:

{ "code": 1508, "message": "Operand 'operand2' : Missing '}'.", "operator": "", "operand": "operand2", "link": "", "requestId": "7dc874a0-70ca-4b9b-9d31-0eb76e041184" }


1509

Operator '%s' : Found more operands than expected.

This gets invoked when there are more operands than required in the expression. For example, in addDays function, only two operands are needed, one is the date and the other is the number of days we want to add to it. Now, any other operand would be considered redundant here because the function itself needs only two operands. In such cases, we will get this error.

Sample Payload:

{ "expr": "addDays( #{operand1},  #{operand2}, #{operand3})", "operand_values": { "operand1": "2019-07-30", "operand2": "10", "operand3": "2019-07-03" }, "return_type": "text" }

Response Body:

{ "code": 1509, "message": "Operator 'addDays' : Found more operands than expected.", "operator": "addDays", "operand": "", "link": "", "requestId": "36298540-cc81-40b5-9e41-e651c6dfc43f" }


1510

Operand '%s' : Invalid data type.

This error gets invoked when there is an invalid data type during the validation of the expression. In this example, we are doing an arithmetic operation i.e., adding two operands. Now, since it is an arithmetic operation, both the operands should be numbers. But here we can see operand1 is of string format. So we are throwing an Invalid data type error.

Sample Payload (Validate API):

{ "expr": "#{operand1}+#{operand2}", "operand_data_types": { "operand1": "", "operand2": 4 }, "return_type": "number" }

Response Body:

{ "code": 1510, "message": "Operand 'operand1' : Invalid data type.", "operator": "", "operand": "operand1", "link": "", "requestId": "9dc3e113-15aa-4f09-af75-24f9202e0b86" }


1511

Operator '%s' : Found an extra '%c'.

This occurs when an extra delimiter is present in the expression. In the given example, we can see there is an extra "," in the expression.

Sample Payload:

{ "expr": "max(#{operand1},#{operand2},)", "operand_values": { "operand1": 5, "operand2": 10 }, "return_type": "number" }

Response Body:

{ "code": 1511, "message": "Operator 'max' : Found an extra ','.", "operator": "max", "operand": "", "link": "", "requestId": "52c7d8cd-5cd3-4bf9-b774-829a348f5c7d" }


1512

Invalid return type for expression.

This error gets thrown when the return type of the function is different from what's expected. Like in the example, we are using an abs function which gives the absolute value of an integer x or |x| (modulus) given as an argument to it removing any decimal part from it. So ideally here, the returned item should be an integer but we can see in the payload we can expect a boolean return type which isn't possible. In such cases, we will throw such errors.

Sample Payload:

{ "expr": "abs(#{operand1})", "operand_values": { "operand1": 54.8 }, "return_type": "boolean" }

Response Body: 

{ "code": 1512, "message": "Invalid return type for expression.", "operator": "", "operand": "", "link": "", "requestId": "fe49fb28-5805-4fe4-9f2e-605ad4bfb4a2" }


1513

Invalid text '%s%s' in expression.

--WIP--

--WIP--

1514

Missing '%s'.

This happens when the expression misses a closed parenthesis. Just like in the example.

Sample Payload:

{ "expr": "asin( #{operand1}", "operand_values": { "operand1": 1 }, "return_type": "number" }

Response Body:

{ "code": 1514, "message": "Missing ')'.", "operator": "", "operand": "", "link": "", "requestId": "dc7dd995-bc53-4c40-9d36-4c7d04f50386" }


1515

Operator '%s' : Result of operator is infinitely large.

This happens when we get an infinitely large result from the expression. In this example case, we can see we are doing a multiplication of pow(10,308) to itself. Math.pow(10, 308) returns 1.0000000000000006e308 which is a very huge number. The value we're referring to, 10308, is an extremely large number and is beyond the range of typical floating-point representations used in programming languages. In most programming environments, attempting to calculate 10308 using the pow function or any other standard method will likely result in an overflow or an error due to the limitations of the data types used to represent numbers. So, since we are doing such a huge calculation, we will throw this error.

Sample Payload:

{ "expr": "pow(10,308)*pow(10,308)", "return_type": "decimal" }

Response Body:

{ "code": 1515, "message": "Operator '*' : Result of operator is infinitely large.", "operator": "*", "operand": "", "link": "", "requestId": "37d79d4c-fecc-4f5c-a97c-5a9dcbd208da" }


1516

Missing Operator between operands.

This happens when there is no operator between two operands. In the example, we can see there are two if conditions but they aren't separated with any operator such as &&, ||, etc.

Sample Payload:

{ "expr": "if ('[email protected]'=='[email protected]', 'YES', 'NO')if ('[email protected]'=='[email protected]', 'YES', 'NO')", "return_type": "boolean" }

Response Body:

{ "code": 1516, "message": "Missing Operator between operands.", "operator": "", "operand": "", "link": "", "requestId": "954e494e-6aaf-40eb-82a2-da907fed43dc" }


1517

castOperandTypes meta does not support provided '%s' casting information

This error gets invoked when casting is not possible for a given expression. Just like in the example. Casting is only possible with text to number or text to boolean, hence if someone has given any other argument apart from the above ones, it will throw an error message.

Supported values for cast operand types:

  • “text”:[“boolean”]

  • “text”:[“number”]

  • “text”:[“boolean”, “number”]

Sample Payload:

{ "expr": "abs(#{operand1})", "operand_values": { "operand1": 0.88 }, "cast_operand_types": { "additionalProp1": [ "string" ] }, "return_type": "text" }

Response Body:

{ "code": 1517, "message": "castOperandTypes meta does not support provided '{additionalProp1=[string]}' casting information", "operator": "", "operand": "", "link": null, "requestId": "56a5bdef-98cd-4213-b0a4-c910bdc28c5e" }


1601

Operator '%s' : Second operand's value cannot be 0.

This error gets thrown in cases when the second operand's value is not expected to be zero. Like in the example, we are doing a division by zero which will give us an undefined value and not an exact output. Hence, we will throw such an error.

Sample Payload:

{ "expr": "#{operand1}/#{operand2}", "operand_values": { "operand1": 4, "operand2": 0 }, "return_type": "number" }

Response Body:

{ "code": 1601, "message": "Operator '/' : Second operand's value cannot be 0.", "operator": "/", "operand": "", "link": "", "requestId": "f3ac8c46-0d4b-4571-b7d6-3cd120ce9a81" }


1641

Operator '%s' : Second operand's value must be >= 0.

This error gets thrown in cases when the second operand's value is not expected to be less than zero. For example, there is a string "test". Now, we want a substring out of it. Now, the indexing of characters starts with 0. If we provide it with a value in negative, we won't be able to locate the index as the least index possible is zero. In such cases, we'll throw this error.

Sample Payload:

{ "expr": "substring(#{operand1}, #{operand2}, #{operand3})", "operand_values": { "operand1": "test", "operand2": -1, "operand3": 3 }, "return_type": "text" }

Response Body:

{ "code": 1641, "message": "Operator 'substring' : Second operand's value must be >= 0.", "operator": "substring", "operand": "", "link": "", "requestId": "a83bdf41-7ca8-44a4-bc8e-3338c618d732" }


1642

Operator '%s' : Third operand's value must be <= first operand's length.

This error gets thrown in cases when the third operand's value is expected to be greater than or equal to the first operand's length. Like in the example, we have a string "test" whose length is 4 and the indexing would be from 0 to 3. Now, we are again trying to fetch a substring out of it. Now if we give an operand a value such as 7, like we have given it to operand3, since 7 is an index that isn't present in our string, we won't be able to pull out a substring out of it.

Sample Payload:

{ "expr": "substring(#{operand1}, #{operand2}, #{operand3})", "operand_values": { "operand1": "test", "operand2": 3, "operand3": 7 }, "return_type": "text" }

Response Body:

{ "code": 1642, "message": "Operator 'substring' : Third operand's value must be <= first operand's length.", "operator": "substring", "operand": "", "link": "", "requestId": "da0e461f-16a2-49d0-94e0-9a273304b0ab" }


1643

Operator '%s' : Third operand's value must be > second operand's value.

This error gets thrown in cases when the third operand's value is expected to be greater than the second operand's value. For example, we have a string "test", and the first operator as 2 which would mean we are trying to pull out a substring from the 2nd index from the string that is "s". Now, the third operand is given as 1 which is less than the second operand. Now, we cannot get a substring from a higher index to a lower index which means, we can get a substring from index range 2 to 3 or 2 to 4, but cannot get a substring from 2 to 1 as it isn't possible.

Note that, the third operand i.e., the ending index is exclusive, which means the character at the ending index is not included in the substring. To summarize, when working with substrings and specifying indices, we typically provide the starting index (inclusive) and the ending index (exclusive) to define the range of characters you want to extract.

Sample Payload:

{ "expr": "substring(#{operand1}, #{operand2}, #{operand3})", "operand_values": { "operand1": "test", "operand2": 2, "operand3": 1 }, "return_type": "text" }

Response Body:

{ "code": 1643, "message": "Operator 'substring' : Third operand's value must be > second operand's value.", "operator": "substring", "operand": "", "link": "", "requestId": "5abba160-159f-4c33-b326-ca9924a3e71b" }


1661

Operator '%s' : Second operand's value must be >= 0 and < first operand's length.

This error is invoked when the second operand's value is expected to be greater than or equal to zero and less than the first operand's length. Like in the example, we have a string "test" whose indexing is in the range 0 to 3. Now, with charAt function, we are trying to get the 4th index of the string which isn't present. So, we will get this error.

Sample Payload:

{ "expr": "charAt(#{operand1}, #{operand2})", "operand_values": { "operand1": "test", "operand2": 4 }, "return_type": "text" }

Response Body:

{ "code": 1661, "message": "Operator 'charAt' : Second operand's value must be >= 0 and < first operand's length.", "operator": "charAt", "operand": "", "link": "", "requestId": "a08e7ee1-810c-4d23-8ca7-87f3433cf006" }


1681

Operator '%s' : Operand's value must be >= -1 and <= 1.

This gets invoked when the operand's value is expected to be within the range of -1 to +1. In the example case, we are using the sine function. Since we know that values of sine range from -1 to +1 if we give a value exclusive from them, it won't honor it. That's when we'll get this error.

Sample Payload:

{ "expr": "asin( #{operand1})", "operand_values": { "operand1": 54.8 }, "return_type": "number" }

Response Body:

{ "code": 1681, "message": "Operator 'asin' : Operand's value must be >= -1 and <= 1.", "operator": "asin", "operand": "", "link": "", "requestId": "f2ead814-7924-407f-99e5-b28cf02aba04" }


1701

Operator '%s' : First operand of the function must be of boolean type.

This error gets invoked when the first operand of the function is expected to be boolean. Like in the example case, we are expecting the first operand to be a boolean value. In such cases, we'll throw this error.

Sample Payload:

{ "expr": "if(#{operand1}, #{operand2}, #{operand3})", "operand_values": { "operand1": 5, "operand2": "abc", "operand3": "def" }, "return_type": "text" }

Response Body:

{ "code": 1701, "message": "Operator 'if' : First operand of the function must be of boolean type.", "operator": "if", "operand": "", "link": "", "requestId": "44c8c722-ef3f-40e6-ac93-8a0b7e516935" }


1702

Operator '%s' : Second and third operands value must be of same type.

This error gets invoked when we expect the second operand and third operand to be of the same type. Like in the example, we have given the second operand as a boolean and the third as a decimal which are both different. 

Sample Payload:

{ "expr": "if( #{operand1}, #{operand2}, #{operand3})", "operand_values": { "operand1": true, "operand2": false, "operand3": 9.50 }, "return_type": "decimal" }

Response Body:

{ "code": 1702, "message": "Operator 'if' : Second and third operands value must be of same type.", "operator": "if", "operand": "", "link": "", "requestId": "40ae4e0f-a783-49c2-8931-454b5ac20e46" }


1721

Operator '%s' : %s

This error gets invoked when the date created in Params is invalid. Like in the example, we are trying to create a date of 30th February which is invalid because such date doesn't exist. In such cases, this error will be thrown.

Sample Payload:

{ "expr": "dateTime( #{operand1}, #{operand2}, #{operand3}, #{operand4}, #{operand5}, #{operand6}, #{timezone} )", "operand_values": { "operand1": 2019, "operand2": 2, "operand3": 30, "operand4": 3, "operand5": 3, "operand6": 3, "timezone":"Australia/Sydney" }, "return_type": "date" }

Response Body:


{ "code": 1721, "message": "Operator 'dateTime' : Invalid date 'FEBRUARY 30'", "operator": "dateTime", "operand": "", "link": "", "requestId": "503f745f-232b-4f56-812a-29c9983869f4" }


1722

Operator '%s' : Invalid timezone.

This happens when the timezone is invalid. In the example, we are given the date and time details but haven't specified the timezone such as "Australia/Sydney". So in such cases when a timezone isn't specified or the timezone is wrong, such an error will be thrown.

Sample Payload:

{ "expr": "dateTime( #{operand1}, #{operand2}, #{operand3}, #{operand4}, #{operand5}, #{operand6}, #{timezone} )", "operand_values": { "operand1": 2019, "operand2": 23, "operand3": 3, "operand4": 3, "operand5": 3, "operand6": 3, "timezone":"" }, "return_type": "date" }

Response Body:

{ "code": 1722, "message": "Operator 'dateTime' : Invalid timezone.", "operator": "dateTime", "operand": "", "link": "", "requestId": "4b81bdfe-8340-45c0-b1ef-a56da3d0e5c8" }


1741

Operator '%s' : Operand value must be >=1 and <=18.

This error gets invoked when the operand value is expected to be within the range 1 to 19 (inclusive). Like in the example, we have a randomNumberOfLength function which takes values from 1 to 18. Now, if we specify the operand value to be 19 which is a number our function doesn't honor, we'll get such an error.

Sample Payload:

{ "expr": "randomNumberOfLength(19)", "return_type": "number" }

Response Body:

{ "code": 1741, "message": "Operator 'randomNumberOfLength' : Operand value must be >=1 and <=18.", "operator": "randomNumberOfLength", "operand": "", "link": "", "requestId": "7f566655-0e0a-48e5-9fff-972f94d541d8" }