I am using RestEasy to build up my Restful web services. I have implemented ExceptionMappers to prepare specific exception responses.
I have also implemented MessageBodyWriterInterceptors and a couple of PostProcessorInterceptors.
Issue: All works fine when any resource does not throw any exception. My implementation works as expected. All the post processor interceptors and the message body writer interceptors are called.
But when an exception is thrown from any of the resource methods, the registered ExceptionMappers are called and it is creating the response. But in this case the post processor interceptor chain is not traversed. They are not getting called.
What should I do in this case. Write that interceptor logic in my exception mapper or is there is solution available?