org.springframework.boot.web.reactive.error

Class DefaultErrorAttributes

  • java.lang.Object
    • org.springframework.boot.web.reactive.error.DefaultErrorAttributes
  • All Implemented Interfaces:
    ErrorAttributes


    public class DefaultErrorAttributes
    extends Object
    implements ErrorAttributes
    Default implementation of ErrorAttributes. Provides the following attributes when possible:
    • timestamp - The time that the errors were extracted
    • status - The status code
    • error - The error reason
    • exception - The class name of the root exception (if configured)
    • message - The exception message
    • errors - Any ObjectErrors from a BindingResult exception
    • trace - The exception stack trace
    • path - The URL path when the exception was raised
    Since:
    2.0.0
    Author:
    Brian Clozel, Stephane Nicoll
    See Also:
    ErrorAttributes
    • Constructor Detail

      • DefaultErrorAttributes

        public DefaultErrorAttributes()
        Create a new DefaultErrorAttributes instance that does not include the "exception" attribute.
      • DefaultErrorAttributes

        public DefaultErrorAttributes(boolean includeException)
        Create a new DefaultErrorAttributes instance.
        Parameters:
        includeException - whether to include the "exception" attribute