We are posting PO data to Oracle instance in XML format using REST API. In a failed case, it is just a printing message from error.description example "HTTP POST on resource 'https://hostname:post/fscmService/PurchaseOrderServiceV2' failed: internal server error (500)." Now the request is to print the exact error message from Oracle Cloud ERP. When we run the same test case from Postman we can see the exact error message in the response body and I am trying to print the same response in mule logger and would like to send the same as response payload but not able to get it.
I tried to debug Mule flow and stoped in Exception handler "On Error Propagate" and looked at all variables to see actual error response but didn't find. Please advise!
Please find below screenshots for reference.
You can access the failed response body via error.errorMessage.payload
.
Here is the fix.
With out Until-Successful: We can access the failed response body via : error.errorMessage.payload or error.muleMessage.typedValue
With Until-Successful: We can access the failed response body via : error.exception.cause.errorMessage.payload or error.exception.cause.errorMessage.typedValue
Thank you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With