Sure, a custom WebApplicationException mapper will do, or, NotFoundExceptionMapper. Another option is to use JAX-RS 2.0 ParamConverterProvider (registered in jaxrs:providers) and control the conversion there

Cheers, Sergey
On 22/10/14 19:55, Benson Margulies wrote:
If I use an enum test as a restful parameter and someone sends in an
invalid value, the logging is pretty verbose.

Can I make my own exception manager to quiet this down? I want to avoid
ERROR-level logs when the client on the other end of the internet is the
responsible party. Of course, I could change to a string param and parse it
myself, but that's no fun.



0    [main] ERROR org.apache.cxf.jaxrs.utils.InjectionUtils  - Instance of
class
com.basistech.wsbus.webservice.servlet.RaasRsRblService$RblRequestDataType
can not be created using static valueOf(String) or fromString(String)
methods
6    [main] WARN  org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper
  - javax.ws.rs.WebApplicationException: HTTP 404 Not Found
at
org.apache.cxf.jaxrs.utils.InjectionUtils.evaluateFactoryMethods(InjectionUtils.java:492)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.handleParameter(InjectionUtils.java:414)
at
org.apache.cxf.jaxrs.utils.InjectionUtils.createParameterObject(InjectionUtils.java:947)
at
org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromUriParam(JAXRSUtils.java:1168)
at
org.apache.cxf.jaxrs.utils.JAXRSUtils.createHttpParameterValue(JAXRSUtils.java:850)
at
org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameter(JAXRSUtils.java:825)
at
org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(JAXRSUtils.java:775)
at
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:212)



Reply via email to