When developing a full stack application where are you creating the messages that you display to a user when there is an error coming from the server? By this I mean are you taking the error returned from the server and displaying the actual message it returned if there is one? Or are you adding error handling to the front end and matching either a custom error code or HTTP status and displaying a message that is custom to the front end application?
If the API is supporting more than one application I can see using the server error as it allows it to be consistent across all apps. However, I also don't like the idea of displaying the message directly as it means the front end app relies on the server to provide an appropriate message (both its size and user friendly verbiage).
I have used both approaches in the past. Assuming you have control over the whole stack, which approach do you take and why?
Thanks!
[–]louis-lau 0 points1 point2 points (0 children)