I have a requirement like " in an application, multiple requests will be coming to the server. some of the rest calls will have redundant(6 times the same error like 500) errors. I need to catch the repeated errors along with which rest call and request and need to enter in DB. is that possible? am using a tomcat application server, Restful Webservices, java 8, Spring.. I read about RestTemplate Interceptor usage. but am not sure that will work for my scenario.
Example : User hits registration(/register api), getUserDeatils(/getDetails), and other rest services... how do we the exception based on repeated errors in server?