Getting error when trying to consume REST Service

0
An error has occurred while handling the request. [User 'MxAdmin' with session id '13a59131-XXXX-XXXX-XXXX-XXXXXXXXba66' and roles 'Administrator'] -------- com.mendix.modules.microflowengine.MicroflowException: Error parsing JSON. Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')  at [Source: (org.apache.http.conn.EofSensorInputStream); line: 1, column: 2]     at StockManagement.REST_GetProducts (CallRest : 'Call REST (GET)') Advanced stacktrace:     at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:154) Caused by: com.mendix.integration.importer.ImportParseException: Error parsing JSON. Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')  at [Source: (org.apache.http.conn.EofSensorInputStream); line: 1, column: 2]           
asked
3 answers
0

You can set the log node REST Consume to Trace level to see the response you get from the server. You can then inspect the content of the response: in my experience, there usually is a hint why things went wrong. For example, I think I have seen this happen when the server returns an HTML document instead of a JSON response when authentication information was missing.

answered
0

I've seen this error in the past when I was trying to call an invalid URL due to a emty object/attribute and got a HTML response instead because of a 404 not found.

answered
0

I’ve got the same error while calling the REST service ..

Make sure to use the right URL in the ‘call REST service’ microflow action 

That solves my error 

answered