title: Spring Rest Client want to see error message instead of exception
body: <p>I have a spring rest client. when authentication details are not provided in the headers and I hit the service with</p>
  
  <pre><code>ResponseEntity&lt;String&gt; resp = restTemplate.exchange(url, HttpMethod.GET, request, String.class);
  </code></pre>
  
  <p>I get exception :</p>
  
  <blockquote>
    <p>invoking error handler Exception in thread "main"
    org.springframework.web.client.HttpClientErrorException: 401
    Unauthorized  at
    org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:91)</p>
  </blockquote>
  
  <p>But when I hit the url on mozilla browser, I get message like </p>
  
  <pre><code>{"errors":[{"code":"xxxx","reason":"xxxx"}]}
  </code></pre>
  
  <p>Now here is what i want: <strong>i want to capture this error message in my code instead of getting 401 exception</strong>. I tried to see if there is anything in the response. But the response received is null. How can I capture the error message received from the webservice ?</p>