public interface ErrorAttributes
DefaultErrorAttributes
Modifier and Type | Method and Description |
---|---|
Throwable |
getError(ServerRequest request)
Return the underlying cause of the error or
null if the error cannot be
extracted. |
Map<String,Object> |
getErrorAttributes(ServerRequest request,
boolean includeStackTrace)
Deprecated.
since 2.3.0 in favor of
getErrorAttributes(ServerRequest, boolean, boolean, boolean) |
Map<String,Object> |
getErrorAttributes(ServerRequest request,
boolean includeStackTrace,
boolean includeMessage,
boolean includeBindingErrors)
Return a
Map of the error attributes. |
void |
storeErrorInformation(Throwable error,
ServerWebExchange exchange)
Store the given error information in the current
ServerWebExchange . |
Map<String,Object> getErrorAttributes(ServerRequest request, boolean includeStackTrace)
getErrorAttributes(ServerRequest, boolean, boolean, boolean)
Map
of the error attributes. The map can be used as the model of
an error page, or returned as a ServerResponse
body.request
- the source requestincludeStackTrace
- if stack trace attribute should be includedMap<String,Object> getErrorAttributes(ServerRequest request, boolean includeStackTrace, boolean includeMessage, boolean includeBindingErrors)
Map
of the error attributes. The map can be used as the model of
an error page, or returned as a ServerResponse
body.request
- the source requestincludeStackTrace
- if stack trace attribute should be includedincludeMessage
- if message attribute should be includedincludeBindingErrors
- if errors attribute should be includedThrowable getError(ServerRequest request)
null
if the error cannot be
extracted.request
- the source ServerRequestException
that caused the error or null
void storeErrorInformation(Throwable error, ServerWebExchange exchange)
ServerWebExchange
.error
- the Exception
that caused the errorexchange
- the source exchange