Class WebFluxResponseStatusExceptionHandler
- java.lang.Object
- org.springframework.web.server.handler.ResponseStatusExceptionHandler
- org.springframework.web.reactive.handler.WebFluxResponseStatusExceptionHandler
- All Implemented Interfaces:
WebExceptionHandler
public class WebFluxResponseStatusExceptionHandler extends ResponseStatusExceptionHandler
Common WebFlux exception handler that detects instances ofResponseStatusException(inherited from the base class) as well as exceptions annotated with@ResponseStatusby determining the HTTP status for them and updating the status of the response accordingly.If the response is already committed, the error remains unresolved and is propagated.
- Since:
- 5.0.5
- Author:
- Juergen Hoeller, Rossen Stoyanchev
Constructor Summary
Constructors Constructor Description WebFluxResponseStatusExceptionHandler()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected HttpStatusdetermineStatus(Throwable ex)Determine the HTTP status implied by the given exception.Methods inherited from class org.springframework.web.server.handler.ResponseStatusExceptionHandler
handle, setWarnLogCategory
Constructor Detail
WebFluxResponseStatusExceptionHandler
public WebFluxResponseStatusExceptionHandler()
Method Detail
determineStatus
@Nullable protected HttpStatus determineStatus(Throwable ex)
Description copied from class:ResponseStatusExceptionHandlerDetermine the HTTP status implied by the given exception.- Overrides:
determineStatusin classResponseStatusExceptionHandler- Parameters:
ex- the exception to introspect- Returns:
- the associated HTTP status, if any