cancel
Showing results for 
Search instead for 
Did you mean: 

REST receiver Adapter non 200 Error Handling

buddhika_krishantha
Active Participant

Hi,

I'm using SAP PI 7.5 SP 21. I have a proxy to REST synchronous scenario(The receiver system is COUPA). It is working as expected when the proxy sends the correct payload to the REST receiver. But due to some data issues in the payload receiver responds non 200 status. When I try the same using Postman, I can receive the error message with status code 400 as below.

<?xml version="1.0" encoding="UTF-8"?><errors> <error> <![CDATA[PO Number has already been taken]]> </error></errors>

I want to get the same response to PIMON. I have used parameters useResponseErrorMessage, setAppErrorOnCustomMessage, traceResponse in Rest receiver. Once I used mentioned parameters, it is throwing a mapping error. Could you please help me on this regard.

Transmitting the message using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error encountered while executing mapping: com.sap.aii.af.service.mapping.MappingException: Mapping failed in runtimeRuntime Exception when executing application mapping program com/sap/xi/tf/_MM_PO_Request_; Details: com.sap.aii.mappingtool.tf7.IllegalInstanceException; Cannot create target element /Record. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD
View Entire Topic
buddhika_krishantha
Active Participant
0 Kudos

Any answer might be helpful. 🙂