cancel
Showing results for 
Search instead for 
Did you mean: 

OData call through HTTP Error Handling

David_Oexner
Participant
0 Kudos

Dear All,

We have a scenario as given below. 3rd party is calling an OData service synchronously through CI and Gateway and ERP as per the below flow.

3rd party --> CI --> SAP Gateway --> SAP ERP

We are not using the OData adapter due to some syntax/format issues and HTTP was chosen. Whenever any ABAP dump is thrown in the backend ERP system then the gateway forwards it to CPI but in CPI we get the error like

com.sap.it.rt.adapter.http.api.exception.HttpResponseException: An internal server error occured: HTTP operation failed invoking http://xxxxx/sap/opu/odata/sap/xxxx/xxx with statusCode: 500.
The MPL ID for the failed message is : BGYA-Z0S3gl-6qxBdCngJ8AeHb4c

The detailed error text from ABAP layer is not shown in this message. We have chosen "Return Exception to Sender" in the iFlow settings in order to pass the errors. But how to pass the error dump details from SAP service to the caller?

Accepted Solutions (0)

Answers (1)

Answers (1)

MartyMcCormick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello

Can you try using the attached script in your exception subprocess?  https://help.sap.com/docs/cloud-integration/sap-cloud-integration/script-example-for-exception-handl...

Thanks

David_Oexner
Participant
0 Kudos

Hello
We have already a feature to handle exception in the adapter which is capturing it as shown below. The script is doing the same?
But how do we throw this back to the caller?

Throw Exception On Failure
Attach Error Details on Failure