I have a REST api spring boot application and would like to handle any error in ControllerAdvice, because I would like to have a customised response format and not use the Spring default response.
For example Exception like RequestRejectedException are not handled via Controller advice. Is there an elegant way to handle any possible error in a one handler on Spring?
For the RequestRejectedException I have implemented a GenericFilterBean and reformatted the response there but would like to have a more unified way to handling all errors.