cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Exception response not being sent back to HTTPS Sender Adapter

0 Likes
2,074

I am using HTTPS Sender Adapter in my IFLOW.I want to handle the exceptions.

I have the parameter Return Exception To Sender checked. But I am still getting a generic message when an exception occurs and not the exception message.

Use Case: I am using a Splitter and exception occurs when processing of a record fails. I have Stop on Exception checked in the Splitter.

I have tried adding a Exception SubProcess with a Content Modifier. But this also does not send the exception message to the Sender.

How can I send the exception text back to HTTPS Sender?

Accepted Solutions (0)

Answers (3)

Answers (3)

VijenderGouda
Active Participant
0 Likes

Hi shruthi.dhiraj,

In the Exception Subprocess while you use a content modifier where you can pass the exception in the body as ${exception.message}.
Copy down the same ${exception.message} in a content modifier before the end event of the main iflow you can send the response to the Sender back

You can test this in Postman and check.

Regards,

Vijender

former_member226
Employee
Employee
0 Likes

Hello,

In order to read the exception's message text and send it to external system, you need to read property "CamelExceptionCaught" and use

def ex = map.get("CamelExceptionCaught"); // Get exception caught
def messageCust = ex.getResponseBody(); // Read the message from exception

finally,send captured message text from "messageCust" to external system using setBody() method call.

For more details please check: https://help.sap.com/viewer/368c481cd6954bdfa5d0435479fd4eaf/LATEST/en-US/a443efe1d5d2403fb95ee9def1...

robsonchiarello
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Shruthi,

Have you tried using an exception end event in your exception subprocess?

Regards,

Robson

0 Likes

Hi Robson,

Yes I have added and tried that too. Its not sending back the exception response.