Anoop
Anoop

Reputation: 859

Invalid property name: `errorType` on class `java.lang.String`. Validate that the correct setters is present

When I try to use a json-logger in Mule 4. I'm getting this error. I'm trying to log a error object here but it is not getting successfull. Please find the error object below.

json-logger properties

error-object

Upvotes: 0

Views: 3371

Answers (2)

Anoop
Anoop

Reputation: 859

I sorted out the issue. The issue was we cannot give JSON in the MESSAGE section of json-logger. When i changed it to a string. It worked

The MESSAGE section is meant to describe what you are going to Log.

Upvotes: 1

aled
aled

Reputation: 25699

It looks like you are trying to use the function stringifyNonJSON() with a Mule error and treat it like a String. Without more details of the flow and the payload it is not possible to have more insights.

You could try to create a string from the payload manually first and use that as the parameter, as the function is not able to handle this case apparently.

Upvotes: 0

Related Questions