Thanks, that's what I was guessing, but thought I would check with the pros!
----- Original Message ----- From: "Bill Burke" <bbu...@redhat.com> To: resteasy-users@lists.sourceforge.net Sent: Wednesday, April 23, 2014 1:40:02 PM Subject: Re: [Resteasy-users] exception mappers and intercepting them? I would catch the upstream and handle it within code. On 4/23/2014 3:36 PM, Tom Butt wrote: > We currently use exception mappers, but I ran across an odd case. We work as > a proxy to other systems, so if we get back a poorly formed response, we have > an exception mapper for JAXBUnmarshalException. The problem is, if somebody > sends in (to us) a poorly formatted request, it also hits our mapper (as it's > the same exception.) In this case, we would like the responses to be > different. If the user sends in poorly formatted XML for example, we would > return a 400 response. If we get a bad response from the call we make to the > upstream system, then we return a 502 response. If I put this exception > mapper in place, we get all 502s. Is there a way to differentiate? Is this > a case where I shouldn't deal with the mapper and simply catch this exception > from the upstream system and throw a 502? Thanks in advance! > -Tom > > ------------------------------------------------------------------------------ > Start Your Social Network Today - Download eXo Platform > Build your Enterprise Intranet with eXo Platform Software > Java Based Open Source Intranet - Social, Extensible, Cloud Ready > Get Started Now And Turn Your Intranet Into A Collaboration Platform > http://p.sf.net/sfu/ExoPlatform > _______________________________________________ > 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 ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users ------------------------------------------------------------------------------ Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users