I work on a spring kotlin backend which has an angular and a mobile frontend. We are currently working on error handling and we decided that the backend should return an error code, a general message (probably in english) and parameters for the frontends to build their own, localized messages.
However, we are not sure in what way we should model the "parameters" for the message. It could be just a map or a more generic ErrorDetails
interface with some implementations for specific errors.
On the angular side we plan to use transloco for translation if that is relevant.
I did not find many resources on this specific topic and maybe someone has some valuable tips for me.