Hi, currently working on a order system and we have a service for generating invoices for a given order. As we want to give the user a good experience we have implemented several “throw exception” situations in our service logic. But when these are triggered the only error message the user is left with (in the app) is that the entire service failed, not the custom messages that are thrown in the service.
We have an idea on how to bypass this by creating a sort of errormessage object, which is database connected and has a field for the error message. In this way we can extract the error message that is generated (added to the errormessage object in the service) and show it to our users in the app. We also looked at the event log mechanic, but dont feel like that is the optimal solution for this kind of problem.
If there is any simpler solutions, please let us know:)