Json parsing error

Hi Everyone,
I am using a post API for some business logic which takes where request structure is in json format. If the user call the API with incorrect json structure i get a large error like
//
{
“$errorDump”: “com.wm.util.coder.InvalidDatatypeException: [ISC.0076.9012] Invalid state. JSON input stream does not start with the "{" character.\n\tat com.wm.util.coder.IDataJSONCoder.decode(IDataJSONCoder.java:371)\n\tat com.wm.app.b2b.server.ContentHandler_JSON.getInputValues(ContentHandler_JSON.java:52)\n\tat…
“$errorInfo”: {
“$errorDump”: “com.wm.util.coder.InvalidDatatypeException: [ISC.0076.9012] Invalid state. JSON input stream does not start with the "{" character.\n\tat…
“$error”: " Invalid state. JSON input stream does not start with the "{" character.”,
“$localizedError”: " Invalid state. JSON input stream does not start with the "{" character.”,
“$errorType”: “com.wm.util.coder.InvalidDatatypeException”,
“$service”: “service_name”,
“$user”: “username”,
“$time”: “Wed Jul 24 09:39:02 IST 2024”
},
“$error”: “Invalid state. JSON input stream does not start with the "{" character.”,
“$errorType”: “com.wm.util.coder.InvalidDatatypeException”
}
//
I am trying to hide this response from the user as this will contain my background service name amongst other info.

is there a way to hide this response in webMethods integration server settings.
I can’t do anything in my flow service as the request is not coming to flow service only. The jackson json parser is rejecting input and giving response automatically.

How can i avoid this.

Checking the status code doesn’t work for you? You can also implement a try catch if http status codes don’t work. Please show a screenshot of the service implementation if this is not the right answer you are looking for.

Can you share more about how your IS components are structured? Are you using a RAD provider?

Hi Ajay,

See the documentation for watt.server.http.returnException in the Admin Guide. The verbose/brief/message settings for this property are available in a recent Core_Fix in version 10.7 and later.

3 Likes

Thanks for the guide link.