[undertow-dev] re-establish a usable response object after an IOException

Rebecca Searls rsearls at redhat.com
Mon Oct 31 14:50:59 EDT 2016


Resteasy is processing a REST request that is to produce a JSON object.  The
generation of the JSON object fails because the users's (class) object is missing
a required annotation.  This programming error causes an IOException to be thrown
by com.fasterxml.jackson.databind.ObjectWriter and the response is tagged
as completed in HttpServerExchange.  But the user has also defined a custom
ExceptionMapper<throwable> for Resteasy to use to report any exceptions. Custom
ExceptionMappers in this case are processed after the response has be marked complete.  
Is there any way to re-establish a usable response object so the user's ExceptionMapper can
report the failure to the client?


More information about the undertow-dev mailing list