Package org.springframework.web.reactive
Interface DispatchExceptionHandler
- All Known Implementing Classes:
RequestMappingHandlerAdapter
public interface DispatchExceptionHandler
Contract to map a
Throwable
to a HandlerResult
.- Since:
- 6.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<HandlerResult>
handleError
(ServerWebExchange exchange, Throwable ex) Handler the given exception and resolve it toHandlerResult
that can be used for rendering an HTTP response.
-
Method Details
-
handleError
Handler the given exception and resolve it toHandlerResult
that can be used for rendering an HTTP response.- Parameters:
exchange
- the current exchangeex
- the exception to handle- Returns:
- a
Mono
that emits aHandlerResult
or the original exception
-