In some cases, the server throws TradistaTechnicalExceptions embedding other exception objects. It is for example the case of DAOs, which throw TradistaTechnicalExceptions embedding SQLExceptions. The problem of this approach is that the SQLException class doesn't exist on client side, and this leads to an issue when the client handles the received exception.
This kind of approach must be rethought globally at server level. We must consider the fact that the original exception class may not exist on client side. So, instead of sending the full exception object, the exception message or the stack trace could be sent (target solution to be further analysed).
In some cases, the server throws TradistaTechnicalExceptions embedding other exception objects. It is for example the case of DAOs, which throw TradistaTechnicalExceptions embedding SQLExceptions. The problem of this approach is that the SQLException class doesn't exist on client side, and this leads to an issue when the client handles the received exception.
This kind of approach must be rethought globally at server level. We must consider the fact that the original exception class may not exist on client side. So, instead of sending the full exception object, the exception message or the stack trace could be sent (target solution to be further analysed).