title: Stack trace not shown on console after adding @ResponseStatus for custom exception handling
body: <p>I need to throw a custom exception and pass only the exception message in the response, but I still need to see the full stack trace in the console. My exception is defined as:</p>
  <pre><code>@ResponseStatus(HttpStatus.BAD_REQUEST)
  public class CartNotFoundException extends RuntimeException {
  
      public CartNotFoundException(String message) {
          super(message);
      }
  }
  </code></pre>
  <p>And I throw the exceptions like:</p>
  <pre><code>    final Cart cart = cartsRepository.findByUidAndUsername(cartUid, username);
      if(cartModel == null) {
          throw new CartNotFoundException(&quot;No cart found with uid: &quot; + cartUid);
      }
  </code></pre>
  <p>The json response that I get is in the format:</p>
  <pre><code>{
      &quot;timestamp&quot;: &quot;2020-09-23T17:04:59.702+00:00&quot;,
      &quot;status&quot;: 400,
      &quot;error&quot;: &quot;Bad Request&quot;,
      &quot;message&quot;: &quot;No cart found with uid: 84b5305f-e6e2-4d34-a665-20f37b8edfe&quot;,
      &quot;path&quot;: &quot;/carts/84b5305f-e6e2-4d34-a665-20f37b8edfe&quot;
  }
  </code></pre>
  <p>But the issue is I'm not able to see the full stack trace in the console, after adding the @ResponseStatus annotation on the custom exception. This is a sample of the exception logging strategy I'm planning to use, I would need the full stack trace to be logged in console logs, and the json response as shown here is sufficient. I have tried adding <code>server.error.include-stacktrace=always</code> in properties but this gives me the whole stack trace in the message field of the response.</p>
  <p>Is there anyway to get just the message in response and the whole trace logged in console? Any way to achieve it using just annotations/property changes? (trying to avoid/reduce writing extra handlers/advices)</p>