title: Throwing WebapplicationException from one webapp and getting UniformInterfaceException on other
body: <p>I see a weird issue. I have two webapps. One for the rest webservice that we exposed using Jersey. Another has the JSF Front End implementation which calls above webservice to fetch the details. We are using Tomcat as a container.  </p>
  
  <p>The issue that i am facing is when i call a rest webservice, i throw WebApplicationException like this</p>
  
  <pre><code>catch (CustomExceptions e) {
      ResponseBuilder response = new ResponseBuilderImpl();
      response.status(500);
      response.entity(e.getStackTrace());
      throw new WebApplicationException(e, response.build()); 
  }
  </code></pre>
  
  <p>And on the other hand on FE webapps, i do the following:</p>
  
  <pre><code>try {
      r.get(MyClass.class);
      return "SUCCESS";
  } catch (WebApplicationException wae) {
      return "FAILURE";
  } catch (UniformInterfaceException wae) {
      return "FAILURE";
  }
  </code></pre>
  
  <p>Here in the catch block i was expecting the WebApplicationException but its throwing UniformInterfaceException which is weird. Also if it throws UniformInterfaceException, It does not maintain the stacktrace. Even the response that i passed in from rest call is lost. Can somebody help me how can i get the original stacktrace from the rest call?</p>
  
  <p>Thanks in advance.</p>