Symptom
You have created an external web service which results in error. The error says "HTTP error while receiving response". Now, you would like to use such failure request to create instances in a custom business object via script in order to handle such scenarios.
Environment
- SAP Cloud for Customer
- SAP Business ByDesign
- SAP Cloud Applications Studio
Reproducing the Issue
- Create a Custom Business Object.
- Create an External Web Service.
- Send a Request for External Web Service.
- You can see "HTTP error while receiving response".
- Now, you create a script to create an instance in custom business object when the web service response has aforementioned error message.
- The instances of the custom business object are not saved.
Cause
These errors are raised because web service fails and even before taking exact error of the web service response, the system already raises "HTTP error while receiving response" error message. Since it is an Error (E) message, the system does not save those instances, which is expected from a technical system perspective. In summary, if the web service itself fails, then the system raises error message and consequently the save also fails.
Resolution
The system currently does not support such scenario. There is no way to handle these web service errors since these error messages will be raised and prevent you to save any instance in custom business objects.
Keywords
HTTP error while receiving response, web service, business object, save fails, custom web service , KBA , AP-RC-BDS-WS , ByDesign Studio Web Services , How To