users@jersey.java.net

[Jersey] Are ExceptionMappers supported by the client API?

From: cowwoc <cowwoc_at_bbs.darktech.org>
Date: Fri, 09 Nov 2012 11:13:59 -0500

Hi,

     I've got an ExceptionMapper that works fine on the server side. I
tried registering it on the client-side using:

     private static ClientConfig getClientConfig()
     {
         ClientConfig result = new DefaultClientConfig();
result.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, true);
         result.getClasses().add(JsonMappingExceptionMapper.class);
         return result;
     }

         JerseyTest server = new JerseyTest(new WebAppDescriptor.Builder().
             contextListenerClass(JerseyContextListener.class).
             filterClass(GuiceFilter.class).servletPath("/").
             clientConfig(getClientConfig()).build());

     but it never gets fired. Any ideas?

Thanks,
Gili