-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Hi Philip!
I am working on setting up an AS2 servlet in my Spring Boot app. Everything seems to be working as intended, however, I am looking for the best way to pass exceptions back to the sending partner.
One example I'm looking at specifically is when we receive a message from a partner that has an AS2 ID that isn't set up in our system I would like to throw an exception and send some sort of message back in their API call response. I have tried throwing an AS2Exception in the PartnershipFactory class that I wrote, however, this is resulting in the sender receiving a blank text body and a 200 status code in the response.
What is the best way to handle passing exceptions back to the senders so that they know there were issues in the process?
The other causes of exceptions that come to mind could be due to some issue processing the file that we are receiving or even issues within our network after the point of the sender connecting to our endpoint.
I'm guessing there is a setting or attribute I can add to my AS2ServletReceiverModule when I am initializing it in my code configuration, but I haven't had much luck.
Please let me know if you have any suggestions! Thank you as always for the help!