Interface ErrorAttributes

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and TypeMethodDescription
      ThrowablegetError​(org.springframework.web.reactive.function.server.ServerRequest request)
      Return the underlying cause of the error or null if the error cannot be extracted.
      Map<String,​Object>getErrorAttributes​(org.springframework.web.reactive.function.server.ServerRequest request, boolean includeStackTrace)
      Return a Map of the error attributes.
      voidstoreErrorInformation​(Throwable error, org.springframework.web.server.ServerWebExchange exchange)
      Store the given error information in the current ServerWebExchange.
    • Method Detail

      • getErrorAttributes

        Map<String,​ObjectgetErrorAttributes​(org.springframework.web.reactive.function.server.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​(org.springframework.web.reactive.function.server.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
      • storeErrorInformation

        void storeErrorInformation​(Throwable error,
                                   org.springframework.web.server.ServerWebExchange exchange)
        Store the given error information in the current ServerWebExchange.
        Parameters:
        error - the Exception that caused the error
        exchange - the source exchange