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

Default WebApplicationExceptionMapper is preferred over custom one but Documentation states opposite

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.3
    • Fix Version/s: None
    • Component/s: Documentation
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The documentation on customizing the exception mapping in JAX-RS mentions that custom mappers will be preferred over the default WebApplicationExceptionMapper:

      Note that the custom WebApplicationException mapper, if registered, will be preferred to the default one.

      See https://cxf.apache.org/docs/jax-rs-basics.html#JAX-RSBasics-CustomizingdefaultWebApplicationExceptionmapper

      Lately I noticed that after upgrading CXF this is not true anymore for exception mappers that handle all kind of exceptions like ExceptionMapper<Throwable>.

      In CXF-6568 it is mentioned that a new property (actual property name seems to be default.wae.mapper.least.specific) was introduced to restore the previous behavior. I think this property should be mentioned on the JAX-RS basics page, as I didn't find any other resource pointing to this possibility.

        Attachments

          Activity

            People

            • Assignee:
              ffang Freeman Yue Fang
              Reporter:
              daniel@peger.de Daniel H. Peger
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: