You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2013/02/03 19:18:12 UTC

[jira] [Commented] (CXF-4800) Exception mapper on the client in case of method Response retun value

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

Sergey Beryozkin commented on CXF-4800:
---------------------------------------

Hi,

> If exception mapper returns null instead exception, business method should be invoked with "bad response".

Can you clarify this point please ? I think if the mapper does not map then Response needs to be returned as is

thanks, Sergey
                
> Exception mapper on the client in case of method Response retun value
> ---------------------------------------------------------------------
>
>                 Key: CXF-4800
>                 URL: https://issues.apache.org/jira/browse/CXF-4800
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>    Affects Versions: 2.7.2
>            Reporter: Andrei Shakirin
>            Assignee: Andrei Shakirin
>
> TestCase:
> JAX-RS annotated business method returns Response.
> ExceptionMapper is registered on the client side.
> Current behavior: If method throws RuntimeException, exception mapper is invoked for all methods except returning Response ones.
> Desired behavior: Invoke exception mapper for methods returning Response as well, however only for "bad responses" status is >= 300. If exception mapper returns null instead exception, business method should be invoked with "bad response".
> The reason: as far as user registers exception mapper on the client side (it is not mandatory), it makes sense to handle all errors in consistent way via exception mapper. In some special cases, when user would like to process "bad" HTTP Response in the business method, he can return null instead exception in exception mapper.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira