MuleSoft · Mule runtime
MULE:EXPRESSION
Short answer
MULE:EXPRESSION means an error occurred while Mule evaluated a DataWeave expression. Find the expression named in the log, check the values it reads for nulls or wrong types, and add a default or a handler.
VerifiedLast verified
01Error text
Error type: MULE:EXPRESSION02Likely causes
- An error occurred while evaluating a DataWeave expression.
- The expression reads a value that is missing. In the docs' example, a Choice expression
#[message.attributes.queryParams.age < 16]raises this error when the request has noageparameter. - A function in the expression received an argument of a type it does not accept, such as null.
03How to fix it
- Read the log entry for the error. The
Elementfield identifies the component whose expression failed. - Check each value the expression reads. Decide what should happen when one is missing or has an unexpected type.
- Give possibly missing values a fallback with the
defaultoperator, for examplepayload.message default "". - Handle the remaining cases with an error handler of type
EXPRESSION, as the docs' example does to log that a parameter is missing or invalid.
04Official documentation
→Related errors
- You called the function '++' with these argumentsThis DataWeave error means a function was called with a kind of argument it does not accept, most often null. Find which argument is Null in the list the message prints, then give it a fallback with the default operator.
- Cannot coerce String to DateThis DataWeave error means a String could not be converted to a Date because the text is not a valid date for the format and parsing mode in use. Correct the input value, or pick a parsing mode that fits how strict you need to be.
- MULE:COMPOSITE_ROUTINGMULE:COMPOSITE_ROUTING means one or more routes of a Scatter-Gather router failed. The error gathers the errors from the failed routes and the Mule events from the routes that succeeded, so inspect its failures to find which route broke.
Test every fix in a non-production environment before you apply it to production. See how entries are verified.
More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer