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

Default WebApplicationExceptionMapper should be optionally made less specific

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.3, 3.0.7
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Now that the default and custom providers are kept in a single ProviderFactory with a parent-child relationship the default WebApplicationExceptionMapper will win over custom providers which are less specific (ex, RuntimeException mappers) but which expect to catch WebApplicationException.

      It is been confirmed on the spec experts list that it is expected that custom mappers can catch WAE thrown by the runtime itself therefore the fact that CXF uses WAE to enforce spec-related error conditions is sound.

      There's no clarity though how the runtime is expected to manages such runtime-originated WAEs - via its own WAE mapper or even RuntimeException mapper or somehow else.

      Therefore a property "make.default.wae.least.specific" is introduced to ensure a CXF default WAE mapper is only used if no other custom mapper can handle a given WAE to minimize any portability concerns.

      This can be further addressed once we get more clarity on the issue

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              sergey_beryozkin Sergey Beryozkin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: