I have a RestEasy based service in which I do some cleaning work in a ContainerResponseFilter. The problem is that if an unknown exception at runtime (i.e. an exception for which I do not have a mapmaker) is thrown by the resource, the ContainerResponseFilter is never thrown. Is this expected behavior? Is there a workaround? I was looking at the following question (Jonas answer):
How can I log excluded exceptions in my RESTful JAX-RS web service?
and it showed that the ContainerResponseFilter is executed even when an exception is thrown in the controller?
Did I miss something?
source
share