cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Store Exception Message into Message Body By Using Groovy Script in the Exception Sub-Process

04-26-2022 7:57 AM
albertoliu1993 Product and Topic Expert
821 views 2 comments
0 Likes
SAP Managed Tags
Subscribe

Hi Community

Currently I am seeing another issue related to the groovy script. In my exception sub-process, I am also using the groovy script to capture the exception and set this exception into the message body. But this is not working anymore from my side. Please kindly find my groovy script below and could you please kindly suggest are there is anything that I did wrong?

Exception Happens on the XML to JSON Converter:

com.sap.it.rt.adapter.http.api.exception.HttpResponseException: An internal server error occured: No type converter available to convert from type: null to the required type: javax.xml.stream.XMLEventReader with value null. The MPL ID for the failed message is : AGJnBRIlYED7i2GPtyCixNoaekVN

0 Likes

Accepted Solutions (0)

Answers (1)

Answers (1)

PriyankaChak
SAP Champion
SAP Champion
0 Likes

Hi Weikun,

This groovy script is for catching exception thrown by HTTP adapter. Can you check if the response body in the XML format for HTTP exception? As per the error, it seems it in not in XML format and that's why converter step is throwing error.

Regards,

Priyanka

albertoliu1993
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Priyanka,

I just double-checked my exception message, which is stored in the attachment of HTTP_Receiver_Adapter_Response_Body, is in the XML format for sure.

And also since I get this script from our SAP Help Portal and trying to store the exception message in another new attachment called http.responseBody, but as you can see in the attachment list, there is no such attachment. But this script is working fine in my another I-FLOW. Could you please kindly suggest how should I resolve this issue ? My goal is to extract the entire exception message which stored in the HTTP_Receiver_Adapter_Response_Body

Best Regards,

Weikun Liu