This week's book giveaway is in the NodeJS forum. We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line! See this thread for details.
1. Created @ControllerAdvice and caught few exceptions. ex: FileNotFoundException or User Defined exception
2. Translated the error message - error message + parameters and constructed the proper error message.
Now not sure how to send the response to the front-end
Currently 500 error is thrown. I have kept the return type as user defined object.
Someone please advise how to gracefully throw an error message to the front-end so that it will be displayed to the user without any issues.