You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Philipp Förmer (JIRA)" <ji...@apache.org> on 2017/12/18 14:52:00 UTC
[jira] [Updated] (CXF-7592) Wrong JAX-RS 2.1 request filter
handling for IOException
[ https://issues.apache.org/jira/browse/CXF-7592?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Philipp Förmer updated CXF-7592:
--------------------------------
Summary: Wrong JAX-RS 2.1 request filter handling for IOException (was: Wrong JAX-RS 2.1 request filter handling for ContainerRequestFilter)
> Wrong JAX-RS 2.1 request filter handling for IOException
> --------------------------------------------------------
>
> Key: CXF-7592
> URL: https://issues.apache.org/jira/browse/CXF-7592
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.2.0, 3.2.1
> Reporter: Philipp Förmer
>
> In JAX-RS 2.1 specification chapter "6.7.1 Server runtime" it is said that:
> {quote}
> [...]When a filter or interceptor method throws an exception, the server runtime will process the exception as described in Section 4.5.1.[...]
> {quote}
> But if a JAX-RS ContainerRequestFilter throws an IOException, then the IOException is immediately catched in JAXRSUtils.runContainerRequestFilters(...) without passing it to exception mapper provider.
> Use case:
> We have a ContainerRequestFilter which reads the json request data with jackson. For a special failure scenario the jackson mapper throws a JsonMappingException. The super type of JsonMappingException is IOException. As CXF catches the IOException the JsonMappingException is not delegated to a custom exception mapper, which performs the mapping from JsonMappingException to the response. As of this, the unexpected status code Internal Server Error is returned.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)