public class ReactiveErrorAttributes
extends org.springframework.boot.web.reactive.error.DefaultErrorAttributes
ErrorAttributes
which adapts the handled HttpError to a Spring Boot's compatible error attributes
representation.| Constructor and Description |
|---|
ReactiveErrorAttributes(WebErrorHandlers webErrorHandlers,
HttpErrorAttributesAdapter httpErrorAttributesAdapter)
Initializes the error attributes with required dependencies.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getErrorAttributes(org.springframework.web.reactive.function.server.ServerRequest request,
boolean includeStackTrace)
Handles the exception by delegating it to the
webErrorHandlers and then adapting
the representation. |
public ReactiveErrorAttributes(WebErrorHandlers webErrorHandlers, HttpErrorAttributesAdapter httpErrorAttributesAdapter)
webErrorHandlers - To handle exceptions.httpErrorAttributesAdapter - To adapt our representation of an error to Spring Boot's representation.NullPointerException - When one of the required parameters is null.public Map<String,Object> getErrorAttributes(org.springframework.web.reactive.function.server.ServerRequest request, boolean includeStackTrace)
webErrorHandlers and then adapting
the representation.getErrorAttributes in interface org.springframework.boot.web.reactive.error.ErrorAttributesgetErrorAttributes in class org.springframework.boot.web.reactive.error.DefaultErrorAttributesrequest - The source request.includeStackTrace - whether to include the error stacktrace information.Copyright © 2019. All rights reserved.