I’ve a Mediator sequence with a Tamino connection step. I defined an on_error sequence where I set the payload and reply (fault scenario).
If I shutdown Tamino DB and then I call main sequence, it successfully calls on_error subsequence but, it stops execution and I am not able to return back my defined error message.
I get a HTTP 500: Mediator Internal Error instand of my message.
Is there a way to trap that exception and return my defined error message?
I think the documentation isn’t too clear on this subject. The way to go about this is to perform a reply in your on_error sequence. Doing this will return the current payload to the client.
One dependency you have to clear up before the reply step is the xbd.error.text property. It is always set when an error occurs in the sequence somewhere. If it is present, the reply statement to return the current payload will not work. To make sure the reply statement works you need to delete the xbd.error.text property.