On 2014-04-09 21:35, Sergey Beryozkin wrote:

Can you try and manage it at JAX-RS Bean Validation level,
specifically, by adding a ValidationException mapper or at the very
least a RuntimeException mapper ?

CXF doesn't throw ValidationException when it tries to bind a string to an integer; it throws ClientErrorException, so creating ExceptionHandler<ClientErrorException> works, except that exception is too general, it doesn't tell me that the error was trying to bind input arguments, or what input arguments failed. It's documented as "A base runtime application exception indicating a client request error (HTTP {@code 4xx} status codes)."

So in theory ClientErrorException can happen for a wide variety of reasons; I can't use it determine if there was an input error.

Is there some other way of customizing the response when CXF can't bind input arguments?

Thanks,

Raul

Reply via email to