In case you are using the Persist Step to write Message Payloads into the Message Store, you might have noticed that this happens only for successfully processed messages.
When you open the message in MessageStore Viewer, you see no messages in the Message Store.
We at Whitepaper see this as a wrong behavior and asked SAP to change that (topic has been added to the development backlog, let’s cross fingers).
In the meantime (workaround):
Simply catch the exception and escalate the message. It will still “mark” the message as irregular behaviour, but allows the message to be stored.
Luckily our Interface Monitoring solution understands the ESCALATED status as an erroneous message and sends out and alert…
Here´s a simple example how to catch the error situation (here created at the end) and escalate: