As in the case of CoWebFilter
, I added CoWebExceptionHandler
, a coroutine variant of WebExceptionHandler
used for global exception handling in Spring WebFlux.
Comment From: sdeleuze
We need to be careful about not going too far in terms of Coroutines duplications of Reactive contrats, but I think I am in favor of that one for 2 reaons:
- That seems indeed pretty close to CoWebFilter
use cases which is pretty popular among Kotlin developers I think
- This is not yet reflected in the PR, but CoWebExceptionHandler
could introduced the same kind of Coroutines context management as in CoWebFilter
.
@rstoyanchev Would you be ok for that?
@earlgrey02 What about refining your PR to provide Coroutines context management like CoWebFilter
does?
Comment From: rstoyanchev
If CoWebFilter
exists then yes a CoWebExceptionHandler
next to it makes sense.
Comment From: earlgrey02
Instead of creating a separate COROUTINE_CONTEXT_ATTRIBUTE
for CoWebExceptionHandler
, I reused the COROUTINE_CONTEXT_ATTRIBUTE
used in the existing CoWebFilter
and handler(CoroutineContextAwareHandlerFunction
).
Comment From: sdeleuze
Merged and polished, thanks for your contribution.