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

Reply via email to