[
https://issues.apache.org/jira/browse/CXF-8261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17087049#comment-17087049
]
Andriy Redko commented on CXF-8261:
-----------------------------------
Hey [~mattzek] ,
I believe your expectations are correct, as per section 4.5.2 of the JAX-RS 2.1
specification, the ResponseProcessingException should be thrown.
> When a provider method throws an exception, the JAX-RS client runtime will
> map it to an instance of
> ProcessingException if thrown while processing a request, and to a
> ResponseProcessingException
> if thrown while processing a response.
Looks like an issue on CXF side.
Thank you for reporting it.
Best Regards,
Andriy Redko
> Exceptions being thrown in a ClientResponseFilter are ignored
> -------------------------------------------------------------
>
> Key: CXF-8261
> URL: https://issues.apache.org/jira/browse/CXF-8261
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.3.6
> Reporter: Matthias
> Priority: Major
>
> Hi,
> I have a rest client that follows the JAX-RS specification and that is used
> with different implementations like Jersey, RestEasy and Apache CXF. The rest
> server sometimes throws a "404 Not Found" with a json body if something goes
> wrong. I am processing that response in a ClientResponseFilter and throwing a
> custom exception, but Apache CXF somehow ignores that exception and throws a
> NotFoundException instead. All other JAX-RS implementations (jersey,
> resteasy) are wrapping my exception in a ResponseProcessingException, so that
> I can properly access that error.
> My expectation is that Apache CXF behaves like other implementations. I am
> not even able to access the json body when I get an error status code. The
> CXF client seems to completely suppress the response body.
> You can check that issue in this repository:
> [https://github.com/prof-schnitzel/cxf-rest-sample]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)