Spring Boot provides some properties with which we can add the exception message, exception class, or even a stack trace as part of the response payload: server.error ...