Error in Call REST activity

I am a new Mendix developer and trying to call 3rd party REST API from the application, the method of the rest call activity is POST and the link contains one parameter. I also added to the header key and value like what I did in POSTMAN; the key is content-type and its value is application/json, I also set up the authentication as the third party API requires username and password, and for the request body I chose it to be (custom request template) and added the below template: {{     "userId": "demo" } but I am getting this error:   An error has occurred while handling the request. [User 'Anonymous_22bddca6-e332-42d9-82e4-2ddbc62e73a3' with session id 'aca9ebc9-XXXX-XXXX-XXXX-XXXXXXXX6e6e' and roles 'Administrator'] -------- com.mendix.modules.microflowengine.MicroflowException: Error calling REST service     at MyFirstModule.CompleteTask (CallRest : 'Call REST (POST)') Advanced stacktrace:     at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:79) Caused by: com.mendix.modules.microflowengine.MicroflowException: 500:      at MyFirstModule.CompleteTask (CallRest : 'Call REST (POST)') Advanced stacktrace:     at com.mendix.integration.actions.microflow.RestCallAction.checkStatusCode(RestCallAction.scala:117)      
1 answers

Hi Abrar Madi,

The extra bracket is correct as it is used for escaping. 
Did you add error handling and check what is the stack trace? 

if not please add error handling and try to print the Strack trace.


You can also check how the request is going by changing the log level of Rest Consume to trace/Debug to check how the request is going and verify that with postman request.