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.