org.springframework.boot.web.reactive.error

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
    Author:
    Brian Clozel
    See Also:
    DefaultErrorAttributes
    • Method Detail

      • getErrorAttributes

        Map<String,Object> getErrorAttributes(ServerRequest request,
                                              boolean includeStackTrace)
        Return a Map of the error attributes. The map can be used as the model of an error page, or returned as a ServerResponse body.
        Parameters:
        request - the source request
        includeStackTrace - if stack trace elements should be included
        Returns:
        a map of error attributes
      • getError

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