You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Benjamin Reed (Jira)" <ji...@apache.org> on 2023/03/16 20:57:00 UTC

[jira] [Commented] (CXF-8684) Default WebApplicationExceptionMapper should be less specific by default

    [ https://issues.apache.org/jira/browse/CXF-8684?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17701381#comment-17701381 ] 

Benjamin Reed commented on CXF-8684:
------------------------------------

It appears this change has caused a regression for us. We have code that throws {{{}WebApplicationException(Status.NOT_FOUND){}}}, but since this change it appears that the 404 status gets eaten and turned into a 500 instead.

In at least one instance, it's because {{ExceptionUtils.convertFaultToResponse(T, Message)}} checks for both a cause _and_ an entity, and there's no entity defined in an exception that's been created only with {{{}Status.XXX{}}}. We have a couple other test failures when going from 3.5.1 to 3.5.2 as well and I suspect they're the same root cause, but I haven't quite tracked them down yet.

I have confirmed that checking out the {{cxf-3.5.2}} tag, reverting {{{}a11dfac5e5737f39b178f88d2f054892915223e5{}}}, and building causes my tests to pass again.

I'll see if I can put a small test case together.

> Default WebApplicationExceptionMapper should be less specific by default
> ------------------------------------------------------------------------
>
>                 Key: CXF-8684
>                 URL: https://issues.apache.org/jira/browse/CXF-8684
>             Project: CXF
>          Issue Type: Improvement
>    Affects Versions: 3.4.6, 3.5.1
>            Reporter: Andriy Redko
>            Assignee: Andriy Redko
>            Priority: Major
>             Fix For: 3.5.2, 3.4.7, 4.0.0
>
>
> In CXF-6568, the default WebApplicationExceptionMapper was made optionally less specific, however its presence fails the TCK tests. It should be made less specific by default.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)