Hi community,
in my (ODC) setup I'm using one common backend app and three different frontend apps. The database and all the server actions are mainly handled within the backend app and the frontend apps are calling those via Service Actions.
My question is how to handle Exceptions triggered within the backend app? Currently the Exception is triggered within the backend app (where the logic happens). There I also have an Global Exception Handler for User Exceptions that triggers an alert informing about the Exception message (e.g. "Invalid deletion"). This does obviously not work when calling the function via a Service Action. Instead I receive a status code 500 from the called Service Action.
My best guess currently is:
Is there a better way? This approach seems so repetitive and inefficient...
Thank you for your advice,
Konsti
Hi Konsti,
There are many ways to do that but there are two main points where the majority of us will agree:
The question then is, when we have a back-end error what should the front-end do? There is nothing that the user can do, so the main goal is to give a message to the user so that he doesn't feel lost and can restart the app/flow/screen. This message shouldn't be the exception message because 1) security reasons 2) the user won't understand it. A way to see it is, the person that needs to be informed of a system error is not the end-user but the maintenance team.
See this talk on minute 7:20 https://www.outsystems.com/nextstep/on-demand/technical-overviews/?wchannelid=1jzl2oi1en&wmediaid=e5ih041r7j
So a really simple answer on this is option 3 but with a generic error (Sorry , an unexpected system error occurred, please click below to restart).
Hi MFR,
good to know & makes sense! Thank you for the clarification and the reference.
Best