title: Get stack trace of Exception through spring rest template
body: <p>I have 2 services - <code>Service 1</code> and <code>Service 2</code>. <code>Service 1</code> calls some <code>Service 2</code>  API through Spring Rest Template. Now Some exception happened in <code>Service 2</code>. I need the whole stack trace of it in <code>Service 1</code>. How to get it ?</p>
  
  <pre><code>Service 1  ---calls--&gt; Service 2
  </code></pre>
  
  <p>Does the stack trace even get passed to <code>Service 1</code> by Spring ?</p>
  
  <p>You can say I am calling like this :</p>
  
  <pre><code>HttpHeaders headers = new HttpHeaders();
  headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));
  HttpEntity&lt;String&gt; entity = new HttpEntity&lt;String&gt;(headers);
  return restTemplate.exchange("http://localhost:8080/products", HttpMethod.GET, entity, String.class).getBody();
  </code></pre>