[
https://issues.apache.org/jira/browse/CXF-6155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14269394#comment-14269394
]
Sergey Beryozkin commented on CXF-6155:
---------------------------------------
ParamConverter is a mechanism for converting String parameters into custom
types using some non-default conversion rules. The spec rules should still be
met though. Example, if we have a default "1.1" String conversion to Long
produce the error as per the spec then if a custom ParamConverter fails to do
the same conversion then obviously the same error status should be returned.
Can you please clarify further at the jaxrs-users list ?
> Exceptions thrown from ParamConverter generate 500 response
> -----------------------------------------------------------
>
> Key: CXF-6155
> URL: https://issues.apache.org/jira/browse/CXF-6155
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.0.2
> Reporter: Nigel Hannam
> Assignee: Sergey Beryozkin
> Fix For: 3.0.4, 3.1.0
>
>
> JAX-RS 2.0 (section 3.2) indicates that failure to convert a parameter value
> should trigger either a 404 or 400, and CXF does this correctly under some
> circumstances.
> When the conversion is performed using a ParamConverter (see
> InjectionUtils.handleParameter and it's call to
> InjectionUtils.createFromParameterHandler), any exception thrown by the
> ParamConverter is left unhandled and eventually triggers a 500 response.
> At the very least, any IllegalArgumentException from the ParamConverter
> should be caught and converted into the appropriate 400/404 error.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)