DefaultErrorAttributes

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 (if configured)
  • errors - Any ObjectErrors from a BindingResult or MethodValidationResult exception (if configured)
  • trace - The exception stack trace (if configured)
  • path - The URL path when the exception was raised

Author

Phillip Webb

Dave Syer

Stephane Nicoll

Vedran Pavic

Scott Frederick

Moritz Halbritter

Yanming Zhou

Since

2.0.0

See also

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val HIGHEST_PRECEDENCE: Int = -2147483648
Link copied to clipboard
val LOWEST_PRECEDENCE: Int = 2147483647

Functions

Link copied to clipboard
open fun getError(webRequest: WebRequest): Throwable
Return the underlying cause of the error or null if the error cannot be extracted.
Link copied to clipboard
Returns a Map of the error attributes.
Link copied to clipboard
open fun getOrder(): Int
Link copied to clipboard
open fun resolveException(request: HttpServletRequest, response: HttpServletResponse, handler: Any, ex: Exception): ModelAndView