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
Functions
Link copied to clipboard
Return the underlying cause of the error or
null
if the error cannot be extracted.Link copied to clipboard
open fun getErrorAttributes(webRequest: WebRequest, options: ErrorAttributeOptions): Map<String, Any>
Returns a Map of the error attributes.
Link copied to clipboard
open fun resolveException(request: HttpServletRequest, response: HttpServletResponse, handler: Any, ex: Exception): ModelAndView