Let's consider a JAX-RS application configured with both a Sse resource and a ContainerRequestFilter as follow:
On processing an incomming Sse request for the registered Sse resource, the org.jboss.resteasy.plugins.providers.sse.SseEventSinkInterceptor will be invoked and will register a org.jboss.resteasy.plugins.server.servlet.Cleanable in charge of returning the initial Sse response when resource method returns as stated by the spec in chapter 9.5 Processing Pipeline.
Then the registered ExceptionRequestFilter will be invoked and will throw an IOException.
I was expecting this exception to be propagated to the client side through an InternalServerErrorException but instead, because of the registered org.jboss.resteasy.plugins.server.servlet.Cleanable a 200 ok response will be sent to the client.
Another issue with the org.jboss.resteasy.plugins.server.servlet.Cleanable regsitered by the
org.jboss.resteasy.plugins.providers.sse.SseEventSinkInterceptor is that with a servlet that does not support Asynch mechanims, if resource methods return first, I mean before any Sse event has been sent, then the initial response will never be thrown since the cleanables will only be invoked once thread will be released.