Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8261

Exceptions being thrown in a ClientResponseFilter are ignored

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.6, 3.2.13
    • Fix Version/s: 3.2.14, 3.3.7, 3.4.0
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                reta Andriy Redko
                Reporter:
                mattzek Matthias
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: