Interface ErrorAttributes

All Known Implementing Classes:
DefaultErrorAttributes

public interface ErrorAttributes
Provides access to error attributes which can be logged or presented to the user.
Since:
2.0.0
Author:
Phillip Webb, Scott Frederick
See Also:
  • Method Details

    • getErrorAttributes

      default Map<String,Object> getErrorAttributes(WebRequest webRequest, ErrorAttributeOptions options)
      Returns a Map of the error attributes. The map can be used as the model of an error page ModelAndView, or returned as a @ResponseBody.
      Parameters:
      webRequest - the source request
      options - options for error attribute contents
      Returns:
      a map of error attributes
      Since:
      2.3.0
    • getError

      Throwable getError(WebRequest webRequest)
      Return the underlying cause of the error or null if the error cannot be extracted.
      Parameters:
      webRequest - the source request
      Returns:
      the Exception that caused the error or null