JAx-RS requires that any exception thrown in a filter should be wrapped by ResponseProcessingException. So, I don't think you should be implementing this in a filter.
On 4/28/2014 3:52 PM, Rodrigo Uchôa wrote: > Hi everyone! > > Is there a way, using the client API, to map HTTP response codes to > Exceptions? > > I'm developing clients that make calls to REST endpoins. These endpoins > return multiple response error codes. To make things easier on the > client side, I would like to map these response codes to some of my > custom client Exceptions. For instance, a response code 409 could map to > a BusinessException and so on. > > To achieve this, my first instinct was to use a ClientResponseFilter. It > even worked, but the JAX-RS runtime is wrapping my exceptions inside a > *javax.ws.client.ResponseProcessingException*. Although that does not > stop me, all these "arrangements" are making me wonder if I chose the > right path. > > Summing up, is using a ClientReponseFilter the best way? > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > > _______________________________________________ > Resteasy-users mailing list > Resteasy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/resteasy-users > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users